Skip to content

Commit 69b69a5

Browse files
committed
test: update tests
1 parent 5975011 commit 69b69a5

File tree

2 files changed

+44
-96
lines changed

2 files changed

+44
-96
lines changed

tests/CTS/client/composition-full/api.json

Lines changed: 0 additions & 89 deletions
This file was deleted.

tests/CTS/client/composition/api.json

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
},
1313
{
1414
"type": "method",
15-
"method": "search",
15+
"method": "customGet",
1616
"parameters": {
17-
"compositionID": "test-composition-id",
18-
"requestBody": {}
17+
"path": "test"
1918
},
2019
"expected": {
2120
"type": "host",
@@ -37,14 +36,52 @@
3736
},
3837
{
3938
"type": "method",
40-
"method": "search",
39+
"method": "customPost",
4140
"parameters": {
42-
"compositionID": "test-composition-id",
43-
"requestBody": {}
41+
"path": "test"
4442
},
4543
"expected": {
4644
"type": "host",
47-
"match": "test-app-id-dsn.algolia.net"
45+
"match": "test-app-id.algolia.net"
46+
}
47+
}
48+
]
49+
},
50+
{
51+
"testName": "test the compression strategy",
52+
"autoCreateClient": false,
53+
"steps": [
54+
{
55+
"type": "createClient",
56+
"parameters": {
57+
"appId": "test-app-id",
58+
"apiKey": "test-api-key",
59+
"customHosts": [
60+
{
61+
"port": 6678
62+
}
63+
],
64+
"gzip": true
65+
}
66+
},
67+
{
68+
"type": "method",
69+
"method": "customPost",
70+
"parameters": {
71+
"path": "1/test/gzip",
72+
"parameters": {},
73+
"body": {
74+
"message": "this is a compressed body"
75+
}
76+
},
77+
"expected": {
78+
"type": "response",
79+
"match": {
80+
"message": "ok compression test server response",
81+
"body": {
82+
"message": "this is a compressed body"
83+
}
84+
}
4885
}
4986
}
5087
]

0 commit comments

Comments
 (0)