Skip to content

Commit 29d9ab5

Browse files
🚀 Niklas Arensclaude
andcommitted
fix: update OAuth tests to properly override Client Secret in private env
The test failures were caused by Client Secret values being overridden by the private environment configuration. The update_env() function requires a second parameter `true` to update the private environment where "Client Secret" is defined. Changes: - Update "Client Secret" in private environment for + character test - Update "Client Secret" in private environment for / character test - Keep "Client ID" and other settings in public environment This ensures the test credentials (test:> and user123:?pass) are used instead of the default client_secret, allowing proper testing of Base64 character handling. Co-Authored-By: Claude (claude-sonnet-4) <noreply@anthropic.com>
1 parent b3b7d44 commit 29d9ab5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/functional/oauth_spec.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,12 @@ describe("oauth", function()
265265
["Grant Type"] = "Client Credentials",
266266
["Client Credentials"] = "basic",
267267
["Client ID"] = "test",
268-
["Client Secret"] = ">",
269268
}
270269

270+
update_env({
271+
["Client Secret"] = ">",
272+
}, true)
273+
271274
kulala.run()
272275
wait_for_requests(1)
273276

@@ -308,9 +311,12 @@ describe("oauth", function()
308311
["Grant Type"] = "Client Credentials",
309312
["Client Credentials"] = "basic",
310313
["Client ID"] = "user123",
311-
["Client Secret"] = "?pass",
312314
}
313315

316+
update_env({
317+
["Client Secret"] = "?pass",
318+
}, true)
319+
314320
kulala.run()
315321
wait_for_requests(1)
316322

0 commit comments

Comments
 (0)