Use isolated creds for dashboard scenario
This commit modifies the dashboard basic ops scenario to use isolated
creds allocated during the setupClass. Previously this test used hard
coded values from the config file. But, moving forward those options
will be deprecated in favor of the test-accounts file. In preparation
for that shift this test needs to be modified to use the credentials
provided by either tenant isolation or test accounts.
Change-Id: I92d5809ef8c46350684ebbed7269cd6df04f39da
diff --git a/tempest/scenario/test_dashboard_basic_ops.py b/tempest/scenario/test_dashboard_basic_ops.py
index 2014293..35f6689 100644
--- a/tempest/scenario/test_dashboard_basic_ops.py
+++ b/tempest/scenario/test_dashboard_basic_ops.py
@@ -67,7 +67,7 @@
response = urllib2.urlopen(CONF.dashboard.dashboard_url)
self.assertIn("Log In", response.read())
- def user_login(self):
+ def user_login(self, username, password):
self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
response = self.opener.open(CONF.dashboard.dashboard_url).read()
@@ -79,8 +79,8 @@
req = urllib2.Request(CONF.dashboard.login_url)
req.add_header('Content-type', 'application/x-www-form-urlencoded')
req.add_header('Referer', CONF.dashboard.dashboard_url)
- params = {'username': CONF.identity.username,
- 'password': CONF.identity.password,
+ params = {'username': username,
+ 'password': password,
'region': parser.region,
'csrfmiddlewaretoken': parser.csrf_token}
self.opener.open(req, urllib.urlencode(params))
@@ -91,6 +91,7 @@
@test.services('dashboard')
def test_basic_scenario(self):
+ creds = self.credentials()
self.check_login_page()
- self.user_login()
+ self.user_login(creds.username, creds.password)
self.check_home_page()