Skip to content

Commit

Permalink
Add new track ingest environment variables to test
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki-t committed Nov 8, 2024
1 parent dfe540f commit 2af4192
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ def mock_sns():
@pytest.fixture()
def hydrocron_api(hydrocron_dynamo_instance, dynamo_test_proc, mock_ssm):
os.environ['HYDROCRON_ENV'] = 'test'
os.environ['HYDROCRON_dynamodb_endpoint_url'] = f"http://{dynamo_test_proc.host}:{dynamo_test_proc.port}"
os.environ['HYDROCRON_dynamodb_endpoint_url'] = f"http://{dynamo_test_proc.host}:{dynamo_test_proc.port}"
os.environ['BATCH_STATUS'] = '500'
os.environ['DEBUG_LOGS'] = '0'
import hydrocron.utils.connection # noqa: E501 # pylint: disable=import-outside-toplevel
hydrocron.utils.connection._dynamodb_resource = hydrocron_dynamo_instance

Expand Down Expand Up @@ -368,6 +370,8 @@ def track_ingest_dynamo_instance(request, dynamo_test_proc):
def track_ingest_fixture(track_ingest_dynamo_instance, dynamo_test_proc, mock_ssm, mock_s3):
os.environ['HYDROCRON_ENV'] = 'test'
os.environ['HYDROCRON_dynamodb_endpoint_url'] = f"http://{dynamo_test_proc.host}:{dynamo_test_proc.port}"
os.environ['BATCH_STATUS'] = '500'
os.environ['DEBUG_LOGS'] = '0'
import hydrocron.utils.connection # noqa: E501 # pylint: disable=import-outside-toplevel
hydrocron.utils.connection._dynamodb_resource = track_ingest_dynamo_instance
hydrocron.utils.connection._s3_resource = mock_s3
Expand All @@ -376,6 +380,8 @@ def track_ingest_fixture(track_ingest_dynamo_instance, dynamo_test_proc, mock_ss
def track_ingest_cnm_fixture(dynamo_test_proc, mock_sns):
os.environ['HYDROCRON_ENV'] = 'test'
os.environ['HYDROCRON_dynamodb_endpoint_url'] = f"http://{dynamo_test_proc.host}:{dynamo_test_proc.port}"
os.environ['BATCH_STATUS'] = '500'
os.environ['DEBUG_LOGS'] = '0'
import hydrocron.utils.connection # noqa: E501 # pylint: disable=import-outside-toplevel

hydrocron.utils.connection._sns_client = mock_sns

0 comments on commit 2af4192

Please sign in to comment.