fix(test): pin a dummy Gemini key so the webhook SSRF test runs the SSRF branch in CI
This commit is contained in:
parent
c200cf787c
commit
626d4b1917
1 changed files with 6 additions and 1 deletions
|
|
@ -129,7 +129,12 @@ class TestWebhookSigning:
|
|||
expected = "sha256=" + hmac.new(b"s3cret", body, hashlib.sha256).hexdigest()
|
||||
assert app_module._sign_webhook(body, "s3cret") == expected
|
||||
|
||||
def test_process_rejects_private_webhook_targets(self):
|
||||
def test_process_rejects_private_webhook_targets(self, monkeypatch):
|
||||
# The endpoint resolves a Gemini key before validating the webhook; a
|
||||
# dummy env key keeps the test on the SSRF branch both on dev machines
|
||||
# (where .env provides one anyway) and in CI (where nothing does).
|
||||
monkeypatch.setenv("GEMINI_API_KEY", "test-dummy-key")
|
||||
|
||||
async def _run():
|
||||
transport = httpx.ASGITransport(app=app)
|
||||
async with httpx.AsyncClient(transport=transport, base_url="http://t") as client:
|
||||
|
|
|
|||
Loading…
Reference in a new issue