From 65fef1de1cd65a2eca9eb585bcb1062fd858a73b Mon Sep 17 00:00:00 2001 From: Lukas Piwowarski Date: Fri, 16 Oct 2020 10:29:34 +0000 Subject: [PATCH] Fix creating of client manager for network tests Patrole network tests fail when pre-provisioned credentials are used (Could not find user). This is caused by missing 'user_id' and 'tenant_id' parameters in the client manager. The reason why this happens only with network tests is because when client manager from neutron_tempest_plugin is created the set_auth() function which refills the credentials is not called (in contrast with tempest's get_client_manager() function where the set_auth() function is called). This patch makes sure that client manager contains 'user_id' and 'tenant_id' by refilling the credentials using the set_auth() function. Closes-Bug: 1846410 Change-Id: I01ea0da7e43923f50053d41ac069f3f913d5b728 --- patrole_tempest_plugin/tests/api/network/rbac_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patrole_tempest_plugin/tests/api/network/rbac_base.py b/patrole_tempest_plugin/tests/api/network/rbac_base.py index 7093b5c9..ca94e5f4 100644 --- a/patrole_tempest_plugin/tests/api/network/rbac_base.py +++ b/patrole_tempest_plugin/tests/api/network/rbac_base.py @@ -68,6 +68,7 @@ class BaseNetworkExtRbacTest(BaseNetworkRbacTest): if cls.is_neutron_tempest_plugin_available(): from neutron_tempest_plugin.api import clients neutron_tempest_manager = clients.Manager(manager.credentials) + neutron_tempest_manager.auth_provider.set_auth() cls.ntp_client = neutron_tempest_manager.network_client return manager