From 71fef1257badef1ab57ffb7693afe47d9ce59719 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Thu, 1 Sep 2016 10:54:43 -0700 Subject: [PATCH] Use clouds.yaml credentials for admin functional tests. Credentials for the admin devstack configuration are no longer hardcoded. Thus, if infra changes the DSVM config, we should pick up the changes. Change-Id: I8924120aae8a8843d57327793bebce839dea0ebd --- test/functional/keystoneTest.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/functional/keystoneTest.js b/test/functional/keystoneTest.js index 11a87f9..339eae6 100644 --- a/test/functional/keystoneTest.js +++ b/test/functional/keystoneTest.js @@ -20,6 +20,7 @@ import config from "./helpers/cloudsConfig"; describe("Keystone", () => { let devstackConfig = config.clouds.devstack; + let adminConfig = config.clouds['devstack-admin']; let keystone = new Keystone(devstackConfig); describe("versions()", () => { @@ -88,7 +89,12 @@ describe("Keystone", () => { it("should permit passing your own user, password, and project.", (done) => { keystone - .tokenIssue('admin', 'password', 'admin', 'default', 'default') + .tokenIssue( + adminConfig.auth.username, + adminConfig.auth.password, + adminConfig.auth.project_name, + adminConfig.auth.user_domain_id, + adminConfig.auth.project_domain_id) .then((token) => { expect(token).not.toBeNull(); done(); @@ -137,9 +143,9 @@ describe("Keystone", () => { it("should allow an admin to revoke another token.", (done) => { let adminToken; + let adminKeystone = new Keystone(adminConfig); - keystone - .tokenIssue('admin', 'password', 'admin', 'default', 'default') // Create an Admin token. + adminKeystone.tokenIssue() // Get an admin token. .then((token) => { adminToken = token; return keystone.tokenIssue(); // Regular token.