aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2016-09-08 11:24:00 +0200
committerThomas Duval <thomas.duval@orange.com>2016-09-08 11:24:00 +0200
commit184ea3d6f75f6adbee63668f633f856989bd2bbc (patch)
tree3747b31b2030f9bc504039e44e79882d5fadb782 /tests
parent6c3682d22c3b1758b8fca440012dfe2a4b349f5c (diff)
Add a new user for federation test.
Change-Id: I76c620d853179800da548767c3a8484dd2e7d141
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run_tests.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 9b0c1279..eb914a45 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -60,9 +60,17 @@ def __get_endpoint_url(name="keystone"):
def test_federation():
+
+ username = "test_fede"
+ password = "pass_fede"
+
+ # Create a new user in OpenStack
+ proc = subprocess.Popen(["openstack", "user", "create", "--password", password, username, "-f", "yaml"], stdout=subprocess.PIPE)
+ logger.info("Create new user ({})".format(proc.stdout.read()))
+
# Retrieve Moon token
nhost, nport = __get_endpoint_url()
- auth_data = {'username': 'admin', 'password': 'console'}
+ auth_data = {'username': username, 'password': password}
conn = client.HTTPConnection(nhost, nport)
headers = {"Content-type": "application/json"}
conn.request("POST", "/moon/auth/tokens", json.dumps(auth_data).encode('utf-8'), headers=headers)