Skip to content

Commit

Permalink
Add missing env vars and fix authentication override
Browse files Browse the repository at this point in the history
  • Loading branch information
slesaad committed Jul 30, 2024
1 parent 85ed997 commit dbcaed7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stac_api/runtime/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ def test_environ():
os.environ["AWS_SECURITY_TOKEN"] = "testing"
os.environ["AWS_SESSION_TOKEN"] = "testing"
os.environ["AWS_REGION"] = "us-west-2"
os.environ["VEDA_STAC_USERPOOL_ID"] = "us-west-2_FAKEUSERPOOL"
os.environ["VEDA_STAC_CLIENT_ID"] = "Xdjkfghadsfkdsadfjas"
os.environ["VEDA_STAC_CLIENT_SECRET"] = "dsakfjdsalfkjadslfjalksfj"
os.environ["VEDA_STAC_COGNITO_DOMAIN"] = "https://fake.auth.us-west-2.amazoncognito.com"
os.environ["VEDA_STAC_ENABLE_TRANSACTIONS"] = "TRUE"

# Config mocks
os.environ["POSTGRES_USER"] = "username"
Expand Down Expand Up @@ -276,7 +281,8 @@ def api_client(app):
Yields:
TestClient: The TestClient instance for API testing.
"""
app.dependency_overrides["auth.validated_token"] = override_validated_token
from src.app import auth
app.dependency_overrides[auth.validated_token] = override_validated_token
yield TestClient(app)
app.dependency_overrides.clear()

Expand Down

0 comments on commit dbcaed7

Please sign in to comment.