Skip to content

Commit

Permalink
Remove hardcoded credentials and region for unit tests (#10253)
Browse files Browse the repository at this point in the history
  • Loading branch information
viren-nadkarni committed Apr 9, 2024
1 parent ef9e77b commit 09c23de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/unit/conftest.py
@@ -1,11 +1,13 @@
import pytest

from localstack import constants


@pytest.fixture(autouse=True)
def set_boto_test_credentials_and_region(monkeypatch):
"""
Automatically sets the default credentials and region for all unit tests.
"""
monkeypatch.setenv("AWS_ACCESS_KEY_ID", "test")
monkeypatch.setenv("AWS_SECRET_ACCESS_KEY", "test")
monkeypatch.setenv("AWS_DEFAULT_REGION", "us-east-1")
monkeypatch.setenv("AWS_ACCESS_KEY_ID", constants.TEST_AWS_ACCESS_KEY_ID)
monkeypatch.setenv("AWS_SECRET_ACCESS_KEY", constants.TEST_AWS_SECRET_ACCESS_KEY)
monkeypatch.setenv("AWS_DEFAULT_REGION", constants.TEST_AWS_REGION_NAME)

0 comments on commit 09c23de

Please sign in to comment.