aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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)