diff options
author | Thomas Duval <thomas.duval@orange.com> | 2016-09-08 11:24:00 +0200 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2016-09-20 10:38:38 +0200 |
commit | b4d8ca18d99475b1f270d4cc2ff49e2ce7f13599 (patch) | |
tree | dbd7ebd91ed8bf8bb4a32d18ef3e59477aad5e9e | |
parent | 611b98c6659e5a0ba2dd3a8d901543c458d51fb1 (diff) |
Add a new user for federation test.
Change-Id: I76c620d853179800da548767c3a8484dd2e7d141
(cherry picked from commit 184ea3d6f75f6adbee63668f633f856989bd2bbc)
-rwxr-xr-x | tests/run_tests.py | 10 |
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) |