Replace legacy cred provider in heat api test
tempest.api.orchestration.stacks.test_neutron_resources is still using
the legacy credentials provider via
credentials_factory.ConfiguredUserManager, which relies on the
username, password, tenant_name options being set in the identity
section of the tempest config file. However those options have been
deprecated so they are not set in tempest config of devstack/gate jobs,
which results in this test raising InvalidCredentials exception in
gate-tempest-dsvm-neutron-src-python-saharaclient.
Patch replaces legacy credentials provider in test_neutron_resources
by dynamic/pre-provisioned credential provider.
Closes-Bug: #1535434
Change-Id: Ia3e751007a382563d567ecf5a6807b9928cc5948
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 8466e11..09e863e 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -16,7 +16,6 @@
import netaddr
from tempest.api.orchestration import base
-from tempest.common import credentials_factory as credentials
from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
@@ -37,8 +36,8 @@
@classmethod
def setup_credentials(cls):
+ cls.set_network_resources()
super(NeutronResourcesTestJSON, cls).setup_credentials()
- cls.os = credentials.ConfiguredUserManager()
@classmethod
def setup_clients(cls):