Skip to content

Commit 116e45b

Browse files
committed
test(client): align 3 schema-forwarded assertions to auto-wrapped {fields: …} body
## Purpose After a8bde7e made _normalize_schema auto-wrap bare schema dicts in a 'fields' key, the unit-side assertions were aligned in 3a668b8 but three integration tests in test_client.py were missed. ## Solution Updated the final assertion in each of the three schema-forwarding integration tests to expect the wrapped form {"fields": {"text_field": {"type": "str"}}} instead of the bare form. The SDK now sends {schema: {fields: {…}}} on the wire; tests must expect the wrapped form. Fixes CI-0038.
1 parent 518b50a commit 116e45b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/integration/test_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_create_index_schema_parameter_forwarded() -> None:
128128
assert result.name == "test-schema-shim"
129129
sent_body = json.loads(route.calls[0].request.content)
130130
# schema is forwarded into spec.serverless.schema by build_create_body
131-
assert sent_body["spec"]["serverless"]["schema"] == {"text_field": {"type": "str"}}
131+
assert sent_body["spec"]["serverless"]["schema"] == {"fields": {"text_field": {"type": "str"}}}
132132

133133

134134
@respx.mock
@@ -227,7 +227,7 @@ def test_create_byoc_index_spec_schema_forwarded() -> None:
227227
)
228228

229229
sent_body = json.loads(route.calls[0].request.content)
230-
assert sent_body["spec"]["byoc"]["schema"] == {"genre": {"type": "str"}}
230+
assert sent_body["spec"]["byoc"]["schema"] == {"fields": {"genre": {"type": "str"}}}
231231

232232

233233
@respx.mock
@@ -251,7 +251,7 @@ def test_create_byoc_index_method_schema_forwarded() -> None:
251251
)
252252

253253
sent_body = json.loads(route.calls[0].request.content)
254-
assert sent_body["spec"]["byoc"]["schema"] == {"genre": {"type": "str"}}
254+
assert sent_body["spec"]["byoc"]["schema"] == {"fields": {"genre": {"type": "str"}}}
255255

256256

257257
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)