mirror of
https://github.com/Sea-Haven-Industries/apm-wo-analysis.git
synced 2026-09-30 03:03:14 +00:00
Set default AWS region in conftest so boto3 clients construct in CI
This commit is contained in:
parent
17ce1b918b
commit
094c212323
1 changed files with 7 additions and 0 deletions
|
|
@ -4,6 +4,11 @@ Sets dummy environment variables at import time so modules that read
|
|||
``os.environ`` at module load (slackio, interactions, handler) can be imported
|
||||
without real AWS credentials. Real values are monkeypatched per-test where
|
||||
needed.
|
||||
|
||||
A default AWS region is set too: the handler/slackio modules construct
|
||||
``boto3.client(...)`` at import time, which raises ``NoRegionError`` on a CI
|
||||
runner with no AWS config. Client construction is offline; every real AWS call
|
||||
is monkeypatched in the tests.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
@ -11,3 +16,5 @@ import os
|
|||
os.environ.setdefault("SLACK_SECRET_NAME", "test-slack-secret")
|
||||
os.environ.setdefault("DASHBOARD_URL_PARAM", "/test/dashboard-url")
|
||||
os.environ.setdefault("ANALYTICS_BUCKET", "test-bucket")
|
||||
os.environ.setdefault("AWS_DEFAULT_REGION", "us-east-1")
|
||||
os.environ.setdefault("AWS_REGION", "us-east-1")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue