def test_get_smartstack_endpoints_tcp(): with mock.patch( "service_configuration_lib.read_service_configuration", autospec=True ) as mock_read_service_configuration: mock_read_service_configuration.return_value = {"smartstack": {"tcpone": {"proxy_port": 1234, "mode": "tcp"}}} expected = ["tcp://169.254.255.254:1234 (tcpone)"] actual = info.get_smartstack_endpoints("unused") assert actual == expected
def test_get_smartstack_endpoints_http(): with mock.patch("service_configuration_lib.read_service_configuration", autospec=True) as mock_read_service_configuration: mock_read_service_configuration.return_value = { "smartstack": { "main": { "proxy_port": 1234 } } } expected = ["http://169.254.255.254:1234 (main)"] actual = info.get_smartstack_endpoints("unused", "/fake/soa/dir") assert actual == expected
def test_get_smartstack_endpoints_http(): with mock.patch('service_configuration_lib.read_service_configuration', autospec=True) as mock_read_service_configuration: mock_read_service_configuration.return_value = { 'smartstack': { 'main': { 'proxy_port': 1234 } } } expected = ["http://169.254.255.254:1234 (main)"] actual = info.get_smartstack_endpoints('unused', '/fake/soa/dir') assert actual == expected
def test_get_smartstack_endpoints_http(): with mock.patch( 'service_configuration_lib.read_service_configuration', autospec=True ) as mock_read_service_configuration: mock_read_service_configuration.return_value = { 'smartstack': { 'main': { 'proxy_port': 1234 } } } expected = ["http://169.254.255.254:1234 (main)"] actual = info.get_smartstack_endpoints('unused', '/fake/soa/dir') assert actual == expected
def test_get_smartstack_endpoints_tcp(): with mock.patch('service_configuration_lib.read_service_configuration', autospec=True) as mock_read_service_configuration: mock_read_service_configuration.return_value = { 'smartstack': { 'tcpone': { 'proxy_port': 1234, 'mode': 'tcp', } } } expected = ["tcp://169.254.255.254:1234 (tcpone)"] actual = info.get_smartstack_endpoints('unused') assert actual == expected
def test_get_smartstack_endpoints_tcp(): with mock.patch( 'service_configuration_lib.read_service_configuration', autospec=True ) as mock_read_service_configuration: mock_read_service_configuration.return_value = { 'smartstack': { 'tcpone': { 'proxy_port': 1234, 'mode': 'tcp', } } } expected = ["tcp://169.254.255.254:1234 (tcpone)"] actual = info.get_smartstack_endpoints('unused') assert actual == expected