diff options
author | Thomas Duval <thomas.duval@orange.com> | 2016-09-07 14:09:19 +0200 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2016-09-20 10:38:37 +0200 |
commit | b7fd8f7f7a634d1b0298a7b0200347330b75c4eb (patch) | |
tree | d0138cd8ef337b499de1685cf191180b7f9f25e2 /tests | |
parent | e2e0f874b274c818776f79fb8df60778c47967cb (diff) |
Update subprocess code to be compliant with Python2 and update credentials for Swift Moonclient test.
Change-Id: I571f3c48765da02ed7ad6c23b006afe0f97a8636
(cherry picked from commit 705b9d51a9d81ca75b07f71c09d9a4e9f35ed49a)
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(): |