Skip to content

Commit 8e12ccc

Browse files
author
Sergio García Prado
committed
ISSUE #54
* Rename environment variables for discvoery
1 parent b079412 commit 8e12ccc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

minos/api_gateway/rest/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
"rest.host": "API_GATEWAY_REST_HOST",
2828
"rest.port": "API_GATEWAY_REST_PORT",
2929
"rest.cors.enabled": "API_GATEWAY_REST_CORS_ENABLED",
30-
"discovery.host": "DISCOVERY_SERVICE_HOST",
31-
"discovery.port": "DISCOVERY_SERVICE_PORT",
30+
"discovery.host": "API_GATEWAY_DISCOVERY_HOST",
31+
"discovery.port": "API_GATEWAY_DISCOVERY_PORT",
3232
}
3333

3434
_PARAMETERIZED_MAPPER = {
3535
"rest.host": "api_gateway_rest_host",
3636
"rest.port": "api_gateway_rest_port",
3737
"rest.cors.enabled": "api_gateway_rest_cors_enabled",
38-
"discovery.host": "discovery_service_host",
39-
"discovery.port": "discovery_service_port",
38+
"discovery.host": "api_gateway_discovery_host",
39+
"discovery.port": "api_gateway_discovery_port",
4040
}
4141

4242

tests/test_api_gateway/test_rest/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ def test_config_cors(self):
4949
self.assertIsInstance(cors.enabled, bool)
5050
self.assertFalse(cors.enabled)
5151

52-
@mock.patch.dict(os.environ, {"DISCOVERY_SERVICE_HOST": "::1"})
52+
@mock.patch.dict(os.environ, {"API_GATEWAY_DISCOVERY_HOST": "::1"})
5353
def test_overwrite_with_environment_discovery_host(self):
5454
config = ApiGatewayConfig(path=self.config_file_path)
5555
self.assertEqual("::1", config.discovery.host)
5656

57-
@mock.patch.dict(os.environ, {"DISCOVERY_SERVICE_PORT": "4040"})
57+
@mock.patch.dict(os.environ, {"API_GATEWAY_DISCOVERY_PORT": "4040"})
5858
def test_overwrite_with_environment_discovery_port(self):
5959
config = ApiGatewayConfig(path=self.config_file_path)
6060
self.assertEqual(4040, config.discovery.port)

0 commit comments

Comments
 (0)