diff --git a/backend/scraperResultTrigger/function.json b/backend/scraperResultTrigger/function.json index 51b1ce8..ee1388b 100644 --- a/backend/scraperResultTrigger/function.json +++ b/backend/scraperResultTrigger/function.json @@ -5,14 +5,14 @@ "type": "queueTrigger", "direction": "in", "queueName": "scraper-result-queue", - "connection": "QUEUE_STORAGE_CONNECTION" + "connection": "QUEUE_CONNECTION_STRING" }, { "name": "msgOut", "type": "queue", "direction": "out", "queueName": "new-listings-queue", - "connection": "QUEUE_STORAGE_CONNECTION" + "connection": "QUEUE_CONNECTION_STRING" } ] } diff --git a/backend/test/conftest.py b/backend/test/conftest.py index a7ccc4b..bcbb264 100644 --- a/backend/test/conftest.py +++ b/backend/test/conftest.py @@ -9,7 +9,7 @@ from azure.cosmos import PartitionKey, CosmosClient, exceptions from azure.storage.queue import QueueServiceClient -from .constants import COSMOS_CONNECTION_STRING, LISTINGS_FIXTURE, QUEUE_STORAGE_CONNECTION, SCRAPER_RESULTS_QUEUE_NAME, \ +from .constants import COSMOS_CONNECTION_STRING, LISTINGS_FIXTURE, QUEUE_CONNECTION_STRING, SCRAPER_RESULTS_QUEUE_NAME, \ NEW_LISTINGS_QUEUE_NAME @@ -27,7 +27,7 @@ def cosmos_db_client(): @pytest.fixture(scope="module") def queue_service_client(): - return QueueServiceClient.from_connection_string(QUEUE_STORAGE_CONNECTION) + return QueueServiceClient.from_connection_string(QUEUE_CONNECTION_STRING) @pytest.fixture(scope="module") diff --git a/backend/test/constants.py b/backend/test/constants.py index 61fb8fd..62326e3 100644 --- a/backend/test/constants.py +++ b/backend/test/constants.py @@ -2,7 +2,7 @@ import os COSMOS_CONNECTION_STRING = os.getenv("CONNECTION_STRING", default="AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;") -QUEUE_STORAGE_CONNECTION = os.getenv("QUEUE_STORAGE_CONNECTION", default="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;") +QUEUE_CONNECTION_STRING = os.getenv("QUEUE_CONNECTION_STRING", default="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;") API_BASE_URL = os.getenv("API_BASE_URL", default="http://localhost:8000/api") diff --git a/backend/test/prepare_fixture.py b/backend/test/prepare_fixture.py index 1581252..e7452b3 100644 --- a/backend/test/prepare_fixture.py +++ b/backend/test/prepare_fixture.py @@ -2,7 +2,7 @@ from azure.cosmos import CosmosClient, PartitionKey from azure.storage.queue import QueueServiceClient -from constants import COSMOS_CONNECTION_STRING, QUEUE_STORAGE_CONNECTION, SCRAPER_RESULTS_QUEUE_NAME, \ +from constants import COSMOS_CONNECTION_STRING, QUEUE_CONNECTION_STRING, SCRAPER_RESULTS_QUEUE_NAME, \ NEW_LISTINGS_QUEUE_NAME urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) @@ -21,7 +21,7 @@ ) # Assure the queues are created - queue_client = QueueServiceClient.from_connection_string(QUEUE_STORAGE_CONNECTION) + queue_client = QueueServiceClient.from_connection_string(QUEUE_CONNECTION_STRING) existing_queues = [x["name"] for x in queue_client.list_queues()] expected_queues = [SCRAPER_RESULTS_QUEUE_NAME, NEW_LISTINGS_QUEUE_NAME] diff --git a/backend/test/test.settings.json b/backend/test/test.settings.json index 662d054..2f5ff3a 100644 --- a/backend/test/test.settings.json +++ b/backend/test/test.settings.json @@ -3,7 +3,7 @@ "Values": { "FUNCTIONS_WORKER_RUNTIME": "custom", "AzureWebJobsStorage": "", - "QUEUE_STORAGE_CONNECTION": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;", + "QUEUE_CONNECTION_STRING": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;", "COSMOS_DB_CONNECTION": "AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;" } }