diff --git a/scripts/cts/runCts.ts b/scripts/cts/runCts.ts index bf90d06a28..4ea5758e09 100644 --- a/scripts/cts/runCts.ts +++ b/scripts/cts/runCts.ts @@ -40,7 +40,7 @@ async function runCtsOne(language: string): Promise { }); break; case 'ruby': - await run(`bundle install && bundle exec rake test`, { cwd: 'tests/output/ruby' }); + await run(`bundle install && bundle exec rake test --trace`, { cwd: 'tests/output/ruby' }); break; case 'scala': await run('sbt test', { cwd: 'tests/output/scala' }); diff --git a/tests/CTS/requests/search/browse.json b/tests/CTS/requests/search/browse.json index 64e284ceb5..4a8b60e5ad 100644 --- a/tests/CTS/requests/search/browse.json +++ b/tests/CTS/requests/search/browse.json @@ -2,11 +2,22 @@ { "testName": "browse with minimal parameters", "parameters": { - "indexName": "indexName" + "indexName": "cts_e2e_browse" }, "request": { - "path": "/1/indexes/indexName/browse", + "path": "/1/indexes/cts_e2e_browse/browse", "method": "POST" + }, + "response": { + "statusCode": 200, + "body": { + "page": 0, + "nbHits": 33191, + "nbPages": 34, + "hitsPerPage": 1000, + "query": "", + "params": "" + } } }, { diff --git a/tests/CTS/requests/search/getSettings.json b/tests/CTS/requests/search/getSettings.json index 9177b9abc9..ab4a7c109d 100644 --- a/tests/CTS/requests/search/getSettings.json +++ b/tests/CTS/requests/search/getSettings.json @@ -1,11 +1,42 @@ [ { "parameters": { - "indexName": "theIndexName" + "indexName": "cts_e2e_settings" }, "request": { - "path": "/1/indexes/theIndexName/settings", + "path": "/1/indexes/cts_e2e_settings/settings", "method": "GET" + }, + "response": { + "statusCode": 200, + "body": { + "minWordSizefor1Typo": 4, + "minWordSizefor2Typos": 8, + "hitsPerPage": 20, + "maxValuesPerFacet": 100, + "version": 1, + "paginationLimitedTo": 10, + "exactOnSingleWordQuery": "attribute", + "ranking": [ + "typo", + "geo", + "words", + "filters", + "proximity", + "attribute", + "exact", + "custom" + ], + "separatorsToIndex": "", + "removeWordsIfNoResults": "none", + "queryType": "prefixLast", + "highlightPreTag": "", + "highlightPostTag": "", + "alternativesAsExact": [ + "ignorePlurals", + "singleWordSynonym" + ] + } } } ] diff --git a/tests/CTS/requests/search/setSettings.json b/tests/CTS/requests/search/setSettings.json index 3a1a0443c9..73d6e37b45 100644 --- a/tests/CTS/requests/search/setSettings.json +++ b/tests/CTS/requests/search/setSettings.json @@ -2,14 +2,14 @@ { "testName": "setSettings with minimal parameters", "parameters": { - "indexName": "theIndexName", + "indexName": "cts_e2e_settings", "indexSettings": { "paginationLimitedTo": 10 }, "forwardToReplicas": true }, "request": { - "path": "/1/indexes/theIndexName/settings", + "path": "/1/indexes/cts_e2e_settings/settings", "method": "PUT", "body": { "paginationLimitedTo": 10 @@ -17,6 +17,9 @@ "queryParameters": { "forwardToReplicas": "true" } + }, + "response": { + "statusCode": 200 } }, { diff --git a/tests/output/javascript/src/helpers.ts b/tests/output/javascript/src/helpers.ts index 953be2a9de..7f242b928d 100644 --- a/tests/output/javascript/src/helpers.ts +++ b/tests/output/javascript/src/helpers.ts @@ -4,6 +4,14 @@ export function union( ): Record { const res = {}; + if (!expected) { + return expected; + } + + if (typeof expected !== 'object' && !Array.isArray(expected)) { + return expected; + } + for (const [key, value] of Object.entries(expected)) { if (key in received) { if (Array.isArray(value)) { diff --git a/tests/output/python/requirements.txt b/tests/output/python/requirements.txt index 33265ea4b9..241e8e04b3 100644 --- a/tests/output/python/requirements.txt +++ b/tests/output/python/requirements.txt @@ -1,6 +1,6 @@ argcomplete==3.1.6 click==8.1.7 packaging==23.2 -pipx==1.4.1 -platformdirs==4.1.0 +pipx==1.3.2 +platformdirs==4.0.0 userpath==1.9.1 diff --git a/tests/output/python/tests/helpers.py b/tests/output/python/tests/helpers.py index d36a5a0363..b4427765b4 100644 --- a/tests/output/python/tests/helpers.py +++ b/tests/output/python/tests/helpers.py @@ -5,6 +5,9 @@ def union(self, expected: dict, received: dict) -> dict: """ _res = {} + if not isinstance(expected, dict) or not isinstance(received, dict): + return received + for k, v in expected.items(): if k in received: if isinstance(v, dict): diff --git a/tests/output/ruby/test/helpers.rb b/tests/output/ruby/test/helpers.rb index d151f6df76..f7c2a26c15 100644 --- a/tests/output/ruby/test/helpers.rb +++ b/tests/output/ruby/test/helpers.rb @@ -1,6 +1,10 @@ def union(expected, received) res = {} + if !expected.is_a?(Array) and !expected.is_a?(Hash) + return expected + end + expected.each do |key, value| if received.key?(key) if value.is_a?(Array)