From 2c4bf68c9e47f1d25c91398485856792f390f452 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sat, 4 Nov 2023 23:35:41 -0300 Subject: [PATCH] Fix config bug --- gateway/src/api/config.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/gateway/src/api/config.py b/gateway/src/api/config.py index 65a0150..0cfb680 100644 --- a/gateway/src/api/config.py +++ b/gateway/src/api/config.py @@ -1,7 +1,20 @@ -API_USERS = "http://fids_usermanager_api:5000/users" -API_FLIGHTS = "http://fids_flights_api:5000/flights" -API_AUTH = "http://fids_usermanager_api:5000/auth" -LOGS_UPD = "udp://fids_logstash:12201" -API_SUBSCRIPTIONS = "http://fids_subscriptions_api:5000/subscriptions" -API_NOTIFICATIONS = "http://fids_subscriptions_api:5000/notifications" -API_MESSAGES = "http://fids_subscriptions_api:5000/messages" +import os + +TEST_TARGET = os.getenv("TEST_TARGET") + +if TEST_TARGET == "INTEGRATION": + API_USERS = "http://fids_usermanager_api_dev:5000/users" + API_FLIGHTS = "http://fids_flights_api_dev:5000/flights" + API_AUTH = "http://fids_usermanager_api_dev:5000/auth" + LOGS_UPD = "udp://fids_logstash:12201" + API_SUBSCRIPTIONS = "http://fids_subscriptions_api_dev:5000/subscriptions" + API_NOTIFICATIONS = "http://fids_subscriptions_api_dev:5000/notifications" + API_MESSAGES = "http://fids_subscriptions_api_dev:5000/messages" +else: + API_USERS = "http://fids_usermanager_api:5000/users" + API_FLIGHTS = "http://fids_flights_api:5000/flights" + API_AUTH = "http://fids_usermanager_api:5000/auth" + LOGS_UPD = "udp://fids_logstash:12201" + API_SUBSCRIPTIONS = "http://fids_subscriptions_api:5000/subscriptions" + API_NOTIFICATIONS = "http://fids_subscriptions_api:5000/notifications" + API_MESSAGES = "http://fids_subscriptions_api:5000/messages"