@@ -93,12 +93,83 @@ Lint the source code:
9393yarn test:lint
9494```
9595
96- Build
96+ Build:
9797
9898``` shell
9999yarn build
100100```
101101
102+ A successful build run does not produce any message on the terminal.
103+
104+ ## Integration test
105+
106+ Integration tests run against a Trino server running on your workstation.
107+
108+ Requirements:
109+
110+ * [ kind] ( https://kind.sigs.k8s.io/ )
111+ * [ kubectl] ( https://kubernetes.io/docs/reference/kubectl/ )
112+
113+ Create a cluster:
114+
115+ ``` shell
116+ kind create cluster
117+ ```
118+
119+ Deploy Trino:
120+
121+ ``` shell
122+ kubectl apply -f tests/it/trino.yml
123+ ```
124+
125+ Wait for pods to be ready:
126+
127+ ``` shell
128+ kubectl wait --for=condition=ready pods -n trino-system --all --timeout=120s
129+ ```
130+
131+ Ensure Trino is running and available on port ` 8080 ` . Run the following
132+ command in a separate terminal:
133+
134+ ``` shell
135+ kubectl -n trino-system port-forward svc/trino 8080:8080
136+ ```
137+
138+ Run tests:
139+
140+ ``` shell
141+ yarn test:it --testTimeout=60000
142+ ```
143+
144+ Output should look similar to the following:
145+
146+ ``` text
147+ PASS tests/it/client.spec.ts
148+ trino
149+ ✓ exhaust query results (1567 ms)
150+ ✓ close running query (200 ms)
151+ ✓ cancel running query (17 ms)
152+ ✓ get query info (1 ms)
153+ ✓ client extra header propagation
154+ ✓ query request header propagation (88 ms)
155+ ✓ QueryResult has error info
156+ ✓ QueryInfo has failure info (1 ms)
157+ ✓ prepare statement (98 ms)
158+ ✓ multiple prepare statement (432 ms)
159+
160+ Test Suites: 1 passed, 1 total
161+ Tests: 10 passed, 10 total
162+ Snapshots: 0 total
163+ Time: 3.457 s
164+ Ran all test suites matching /tests\/it/i.
165+ ```
166+
167+ Remove the cluster:
168+
169+ ``` shell
170+ kind delete cluster
171+ ```
172+
102173## Contributing
103174
104175Follow the [ Trino contribution guidelines] ( https://trino.io/development/process )
0 commit comments