diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run_tests.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py index 7c48e268..012e173d 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -49,14 +49,14 @@ except ImportError: def __get_endpoint_url(name="keystone"): - with subprocess.Popen(["openstack", "endpoint", "show", name, "-f", "yaml"], stdout=subprocess.PIPE) as proc: - y = yaml.load(proc.stdout.read()) - url = y['publicurl'] - url = url.replace("http://", "") - url = url.replace("https://", "") - host, port = url.split(":", maxsplit=1) - port = port.split("/")[0] - return host, port + proc = subprocess.Popen(["openstack", "endpoint", "show", name, "-f", "yaml"], stdout=subprocess.PIPE) + y = yaml.load(proc.stdout.read()) + url = y['publicurl'] + url = url.replace("http://", "") + url = url.replace("https://", "") + host, port = url.split(":") + port = port.split("/")[0] + return host, port def test_federation(): |