aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2016-09-07 14:09:19 +0200
committerThomas Duval <thomas.duval@orange.com>2016-09-07 14:09:19 +0200
commit705b9d51a9d81ca75b07f71c09d9a4e9f35ed49a (patch)
tree60977353946129e3383f19e2d1ca288fd8e66f51 /tests
parent64ee6a784251c6d977794125f176aed3c5e104ce (diff)
Update subprocess code to be compliant with Python2 and update credentials for Swift Moonclient test.
Change-Id: I571f3c48765da02ed7ad6c23b006afe0f97a8636
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run_tests.py16
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():