Skip to content

test: match query-auth in client test stubs#6

Open
mokevnin wants to merge 1 commit into
mainfrom
fix/client-test-query-auth-stubs
Open

test: match query-auth in client test stubs#6
mokevnin wants to merge 1 commit into
mainfrom
fix/client-test-query-auth-stubs

Conversation

@mokevnin

Copy link
Copy Markdown
Member

CI tests went red after the Stainless migration surfaced normal in-repo CI: client_test.rb had 14 failures + 1 error, all WebMock::NetConnectNotAllowedError.

Root cause: unlike the other SDKs (which authenticate via headers), Tilda sends publickey/secretkey as query params on every request (Client#auth_query). The generated tests stubbed http://localhost/v1/getprojectslist?publickey,secretkey — a malformed query string that never matches the real request ?publickey=My%20Publickey&secretkey=My%20Secretkey, so WebMock rejected every call. These tests could not have passed against this client.

Replaced the 15 stub URLs with the actual encoded auth query the client sends. Test-only; no library change. ./scripts/test → 75 runs, 0 failures, 0 errors; ./scripts/lint green.

🤖 Generated with Claude Code

Tilda sends publickey/secretkey as query params on every request
(auth_query), but the generated client tests stubbed
`getprojectslist?publickey,secretkey` — a malformed query that never
matches the real `?publickey=...&secretkey=...`, so WebMock blocked the
requests (14 failures + 1 error). Stub the actual encoded auth query the
client sends. Test-only change.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant