]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix API tests
authorAssaf Muller <amuller@redhat.com>
Tue, 5 Jan 2016 01:30:43 +0000 (20:30 -0500)
committerAkihiro Motoki <amotoki@gmail.com>
Tue, 5 Jan 2016 10:41:44 +0000 (10:41 +0000)
Patch https://review.openstack.org/#/c/256164/
broke the Neutron API job by unsetting Tempest configuration
values that were unused by Tempest, but used by Neutron's fork
of Tempest. This patch copies credentials from the 'auth' section
to the 'identity' section.

The longer term plan is detailed here:
https://etherpad.openstack.org/p/neutron-tempest-defork
TL;DR: Removed overlap of tests between the Tempest and Neutron
repos, then use Tempest's plugin architecture for the tests that
will remain in the Neutron repo.

Change-Id: Ieb396cfd17f9cb66776ead11e7f760c1c26a0b08

neutron/tests/tempest/config.py

index 256d687dd8de67ca50f4f5dd4e5ebd474befbac5..e1f207ffee5a959ad6c20fdd9a39ff9ad2671100 100644 (file)
@@ -59,7 +59,19 @@ AuthGroup = [
                      "number of concurrent test processes."),
     cfg.ListOpt('tempest_roles',
                 help="Roles to assign to all users created by tempest",
-                default=[])
+                default=[]),
+    cfg.StrOpt('admin_username',
+               help="Administrative Username to use for "
+                    "Keystone API requests."),
+    cfg.StrOpt('admin_tenant_name',
+               help="Administrative Tenant name to use for Keystone API "
+                    "requests."),
+    cfg.StrOpt('admin_password',
+               help="API key to use when authenticating as admin.",
+               secret=True),
+    cfg.StrOpt('admin_domain_name',
+               help="Admin domain name for authentication (Keystone V3)."
+                    "The same domain applies to user and project"),
 ]
 
 identity_group = cfg.OptGroup(name='identity',
@@ -119,18 +131,6 @@ IdentityGroup = [
     cfg.StrOpt('alt_domain_name',
                help="Alternate domain name for authentication (Keystone V3)."
                     "The same domain applies to user and project"),
-    cfg.StrOpt('admin_username',
-               help="Administrative Username to use for "
-                    "Keystone API requests."),
-    cfg.StrOpt('admin_tenant_name',
-               help="Administrative Tenant name to use for Keystone API "
-                    "requests."),
-    cfg.StrOpt('admin_password',
-               help="API key to use when authenticating as admin.",
-               secret=True),
-    cfg.StrOpt('admin_domain_name',
-               help="Admin domain name for authentication (Keystone V3)."
-                    "The same domain applies to user and project"),
 ]
 
 identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
@@ -1148,6 +1148,18 @@ class TempestConfigPrivate(object):
         self.input_scenario = cfg.CONF['input-scenario']
         self.cli = cfg.CONF.cli
         self.negative = cfg.CONF.negative
+
+        self.identity.admin_username = self.auth.admin_username
+        self.identity.admin_password = self.auth.admin_password
+        self.identity.admin_tenant_name = self.auth.admin_tenant_name
+        self.identity.admin_domain_name = self.auth.admin_domain_name
+        self.identity.password = self.auth.admin_password
+        self.identity.tenant_name = 'demo'
+        self.identity.username = 'demo'
+        self.identity.alt_username = 'alt_demo'
+        self.identity.alt_tenant_name = 'alt_demo'
+        self.identity.alt_password = self.auth.admin_password
+
         cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
                              group='identity')
         cfg.CONF.set_default('alt_domain_name',