From 6e1dc58b8ede0fbd2646408c70ef2868b1363fa4 Mon Sep 17 00:00:00 2001 From: zhurong Date: Fri, 1 Dec 2017 09:57:57 +0800 Subject: [PATCH] Fix murano-congress-devstack-dsvm job Change-Id: I2ecfef6e287c0a8adfbde7728de0c1393778a29a --- functionaltests/run_tests_common.sh | 2 +- .../tests/functional/common/tempest_utils.py | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/functionaltests/run_tests_common.sh b/functionaltests/run_tests_common.sh index 2f97be1fd..852ec4b46 100755 --- a/functionaltests/run_tests_common.sh +++ b/functionaltests/run_tests_common.sh @@ -5,7 +5,7 @@ # How many seconds to wait for the API to be responding before giving up API_RESPONDING_TIMEOUT=20 -if ! timeout ${API_RESPONDING_TIMEOUT} sh -c "while ! curl -s http://127.0.0.1:8082/v1/ 2>/dev/null | grep -q 'Unauthorized' ; do sleep 1; done"; then +if ! timeout ${API_RESPONDING_TIMEOUT} sh -c "while ! curl -s http://127.0.0.1/application-catalog/v1/ 2>/dev/null | grep -q 'Unauthorized' ; do sleep 1; done"; then echo "Murano API failed to respond within ${API_RESPONDING_TIMEOUT} seconds" exit 1 fi diff --git a/murano/tests/functional/common/tempest_utils.py b/murano/tests/functional/common/tempest_utils.py index 425dc172e..2d6be1a5c 100644 --- a/murano/tests/functional/common/tempest_utils.py +++ b/murano/tests/functional/common/tempest_utils.py @@ -13,8 +13,9 @@ # under the License. import congressclient.v1.client as cclient -from keystoneauth1 import auth as ksauth +from keystoneauth1 import identity from keystoneauth1 import session as ksasession +import keystoneclient.v3 as ksclient from tempest import config import murano.tests.functional.common.utils as common_utils @@ -28,20 +29,21 @@ class TempestDeployTestMixin(common_utils.DeployTestMixin): @staticmethod @common_utils.memoize def keystone_client(): - return ksauth.identity.v2.Password( - auth_url=CONF.identity.uri, - username=CONF.auth.admin_username, - password=CONF.auth.admin_password, - project_name=CONF.auth.admin_project_name) + return ksclient.Client(username=CONF.auth.admin_username, + password=CONF.auth.admin_password, + tenant_name=CONF.auth.admin_project_name, + auth_url=CONF.identity.uri_v3) @staticmethod @common_utils.memoize def congress_client(): - auth = ksauth.identity.v3.Password( - auth_url=CONF.identity.uri, + auth = identity.v3.Password( + auth_url=CONF.identity.uri_v3, username=CONF.auth.admin_username, password=CONF.auth.admin_password, - project_name=CONF.auth.admin_project_name) + project_name=CONF.auth.admin_project_name, + user_domain_name=CONF.auth.admin_domain_name, + project_domain_name=CONF.auth.admin_domain_name) session = ksasession.Session(auth=auth) return cclient.Client(session=session, service_type='policy')