Browse Source

Merge "Change manila_tempest_tests to use credentials_factory"

Jenkins 3 years ago
parent
commit
30eaf80506

+ 1
- 1
contrib/ci/common.sh View File

@@ -1,6 +1,6 @@
1 1
 # Environment variables
2 2
 
3
-export MANILA_TEMPEST_COMMIT="c43c8f91"  # 05 Nov, 2015
3
+export MANILA_TEMPEST_COMMIT="d160c29b"  # 01 Dec, 2015
4 4
 
5 5
 # ----------------------------------------------
6 6
 

+ 7
- 4
manila_tempest_tests/clients_share.py View File

@@ -14,7 +14,7 @@
14 14
 #    under the License.
15 15
 
16 16
 from tempest import clients
17
-from tempest.common import cred_provider
17
+from tempest.common import credentials_factory as common_creds
18 18
 
19 19
 from manila_tempest_tests.services.share.json import shares_client
20 20
 from manila_tempest_tests.services.share.v2.json import shares_client \
@@ -22,7 +22,10 @@ from manila_tempest_tests.services.share.v2.json import shares_client \
22 22
 
23 23
 
24 24
 class Manager(clients.Manager):
25
-    def __init__(self, credentials=None, service=None):
25
+    def __init__(
26
+            self,
27
+            credentials=common_creds.get_configured_credentials('user'),
28
+            service=None):
26 29
         super(Manager, self).__init__(credentials, service)
27 30
         self.shares_client = shares_client.SharesClient(self.auth_provider)
28 31
         self.shares_v2_client = shares_v2_client.SharesV2Client(
@@ -32,11 +35,11 @@ class Manager(clients.Manager):
32 35
 class AltManager(Manager):
33 36
     def __init__(self, service=None):
34 37
         super(AltManager, self).__init__(
35
-            cred_provider.get_configured_credentials('alt_user'), service)
38
+            common_creds.get_configured_credentials('alt_user'), service)
36 39
 
37 40
 
38 41
 class AdminManager(Manager):
39 42
     def __init__(self, service=None):
40 43
         super(AdminManager, self).__init__(
41
-            cred_provider.get_configured_credentials('identity_admin'),
44
+            common_creds.get_configured_credentials('identity_admin'),
42 45
             service)

+ 6
- 2
manila_tempest_tests/tests/api/base.py View File

@@ -21,6 +21,7 @@ import traceback
21 21
 from oslo_concurrency import lockutils
22 22
 from oslo_log import log
23 23
 import six
24
+from tempest.common import credentials_factory as common_creds
24 25
 from tempest.common import dynamic_creds
25 26
 from tempest import config
26 27
 from tempest import test
@@ -153,7 +154,9 @@ class BaseSharesTest(test.BaseTestCase):
153 154
         ic = dynamic_creds.DynamicCredentialProvider(
154 155
             identity_version=CONF.identity.auth_version,
155 156
             name=name,
156
-            admin_role=CONF.identity.admin_role)
157
+            admin_role=CONF.identity.admin_role,
158
+            admin_creds=common_creds.get_configured_credentials(
159
+                'identity_admin'))
157 160
         if "admin" in type_of_creds:
158 161
             creds = ic.get_admin_creds()
159 162
         elif "alt" in type_of_creds:
@@ -290,7 +293,8 @@ class BaseSharesTest(test.BaseTestCase):
290 293
                         identity_version=CONF.identity.auth_version,
291 294
                         name=service_net_name,
292 295
                         admin_role=CONF.identity.admin_role,
293
-                    )
296
+                        admin_creds=common_creds.get_configured_credentials(
297
+                            'identity_admin'))
294 298
                     net_data = ic._create_network_resources(sc.tenant_id)
295 299
                     network, subnet, router = net_data
296 300
                     net_id = network["id"]

+ 3
- 3
manila_tempest_tests/tests/scenario/test_share_basic_ops.py View File

@@ -78,13 +78,13 @@ class ShareBasicOpsBase(manager.ShareScenarioTest):
78 78
 
79 79
     def init_ssh(self, instance, do_ping=False):
80 80
         # Obtain a floating IP
81
-        floating_ip = (self.floating_ips_client.create_floating_ip()
81
+        floating_ip = (self.compute_floating_ips_client.create_floating_ip()
82 82
                        ['floating_ip'])
83 83
         self.addCleanup(self.delete_wrapper,
84
-                        self.floating_ips_client.delete_floating_ip,
84
+                        self.compute_floating_ips_client.delete_floating_ip,
85 85
                         floating_ip['id'])
86 86
         # Attach a floating IP
87
-        self.floating_ips_client.associate_floating_ip_to_server(
87
+        self.compute_floating_ips_client.associate_floating_ip_to_server(
88 88
             floating_ip['ip'], instance['id'])
89 89
         # Check ssh
90 90
         ssh_client = self.get_remote_client(

Loading…
Cancel
Save