From 1c39a2af38fb29edb2f603b8a2eff39855b026c7 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 6 Sep 2023 17:06:14 +0100 Subject: [PATCH] Ensure tempest include and exclude lists all use unique names When deploying a complex AIO with several services enabled, currently duplicate definitions are made for the tempest test include and exclude lists. It is down to ansible variable precedence to determine which one is actually used. This patch uses the changes made in [1] to allow tempest include and exlude lists to be defined in many variables and aggregated at the point the config files for tempest are written. [1] https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/891579 Change-Id: If047578c283e85b38e73a5f117289f42150f3daf --- .../roles/bootstrap-host/templates/user_variables.aio.yml.j2 | 4 ++-- .../bootstrap-host/templates/user_variables_barbican.yml.j2 | 2 +- .../roles/bootstrap-host/templates/user_variables_ceph.yml.j2 | 4 +++- .../bootstrap-host/templates/user_variables_horizon.yml.j2 | 2 +- .../bootstrap-host/templates/user_variables_ironic.yml.j2 | 4 ++-- .../bootstrap-host/templates/user_variables_magnum.yml.j2 | 4 ++-- .../bootstrap-host/templates/user_variables_manila.yml.j2 | 2 +- .../bootstrap-host/templates/user_variables_murano.yml.j2 | 2 +- .../roles/bootstrap-host/templates/user_variables_nfs.yml.j2 | 2 +- .../bootstrap-host/templates/user_variables_octavia.yml.j2 | 2 +- .../bootstrap-host/templates/user_variables_sahara.yml.j2 | 2 +- .../roles/bootstrap-host/templates/user_variables_zun.yml.j2 | 4 ++-- 12 files changed, 18 insertions(+), 16 deletions(-) diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index e7665ac31e..1da6cf2609 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -149,7 +149,7 @@ neutron_plugin_base: {% endif %} {% if 'neutron' in bootstrap_host_scenarios %} -tempest_test_includelist: +tempest_test_includelist_neutron: - "neutron_tempest_plugin.api.test_networks*" - "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops" @@ -345,7 +345,7 @@ cinder_backends: - ultra-high-iops {% if 'cinder' in bootstrap_host_scenarios %} -tempest_test_includelist: +tempest_test_includelist_cinder: - tempest.scenario.test_minimum_basic.TestMinimumBasicScenario.test_minimum_basic_scenario {% endif %} {% endif %} diff --git a/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 index 3f4908cc33..f7d3a614c2 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_barbican.yml.j2 @@ -15,7 +15,7 @@ tempest_tempest_conf_overrides_barbican: min_microversion: '1.0' max_microversion: latest -tempest_test_includelist: +tempest_test_includelist_barbican: - barbican_tempest_plugin.tests.api tempest_roles: diff --git a/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 index 45693a95e6..3c4d9a1cb7 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 @@ -30,5 +30,7 @@ glance_default_store: rbd glance_rbd_store_pool: images nova_libvirt_images_rbd_pool: vms # NOTE(noonedeadpunk): ceph bug to track the issue https://tracker.ceph.com/issues/46295 -tempest_test_includelist: +tempest_test_includelist_ceph: - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern +# NOTE(noonedeadpunk)L We want here to run _only_ this test as otherwise we might be short on memory +tempest_test_search_includelist_pattern: tempest_test_includelist_ceph diff --git a/tests/roles/bootstrap-host/templates/user_variables_horizon.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_horizon.yml.j2 index dccdf03b74..562b22f4b1 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_horizon.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_horizon.yml.j2 @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -tempest_test_includelist: +tempest_test_includelist_horizon: - tempest.scenario.test_dashboard_basic_ops.TestDashboardBasicOps tempest_tempest_conf_overrides_horizon: diff --git a/tests/roles/bootstrap-host/templates/user_variables_ironic.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_ironic.yml.j2 index 1c74df57c0..ea4e61326a 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_ironic.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_ironic.yml.j2 @@ -10,13 +10,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -tempest_test_includelist: +tempest_test_includelist_ironic: - 'ironic_tempest_plugin.tests.api.admin.test_api_discovery.TestApiDiscovery' - 'ironic_tempest_plugin.tests.api.admin.test_conductor.TestConductors' - 'ironic_tempest_plugin.tests.api.admin.test_deploy_templates' - 'ironic_tempest_plugin.tests.api.admin.test_chassis.TestChassis' -tempest_test_excludelist: +tempest_test_excludelist_ironic: - 'ironic_tempest_plugin.tests.api.admin.test_chassis.TestChassis.test_chassis_node_list' tempest_service_available_ironic: true diff --git a/tests/roles/bootstrap-host/templates/user_variables_magnum.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_magnum.yml.j2 index b60c384c3d..858ccea0f0 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_magnum.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_magnum.yml.j2 @@ -46,14 +46,14 @@ magnum_flavors: vcpus: 1 disk: 5 -tempest_test_includelist: +tempest_test_includelist_magnum: - magnum_tempest_plugin.tests # NOTE(noonedeadpunk): We comment these tests out because of weird magnum things happening like # http://paste.openstack.org/show/790131/ # But when "b''" around auth toke is dropped, everything is fine. -tempest_test_excludelist: +tempest_test_excludelist_magnum: - magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_list_sign_delete_clusters - magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_with_nonexisting_flavor - magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_with_zero_nodes diff --git a/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 index 1fa6a38f91..d7de5809df 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 @@ -27,7 +27,7 @@ tempest_flavors: disk: 5 vcpus: 1 -tempest_test_includelist: +tempest_test_includelist_ceph_manila: - manila_tempest_tests.tests.scenario.test_share_basic_ops.TestShareBasicOpsNFS.test_mount_share_one_vm tempest_tempest_conf_overrides_manila: diff --git a/tests/roles/bootstrap-host/templates/user_variables_murano.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_murano.yml.j2 index d502ccf78d..681f51af05 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_murano.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_murano.yml.j2 @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -tempest_test_includelist: +tempest_test_includelist_murano: - murano_tempest_tests.tests.api.application_catalog.test_services tempest_tempest_conf_overrides_murano: diff --git a/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 index 1dbdad7f65..5cdc367d15 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 @@ -19,5 +19,5 @@ cinder_backends: shares: - ip: 172.29.244.100 share: /srv/nfs/cinder -tempest_test_includelist: +tempest_test_includelist_nfs: - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern diff --git a/tests/roles/bootstrap-host/templates/user_variables_octavia.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_octavia.yml.j2 index 444dba6b9c..e13441a1b0 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_octavia.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_octavia.yml.j2 @@ -10,7 +10,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -tempest_test_includelist: +tempest_test_includelist_octavia: - octavia_tempest_plugin.tests.scenario.v2.test_load_balancer.LoadBalancerScenarioTest octavia_octavia_conf_overrides: diff --git a/tests/roles/bootstrap-host/templates/user_variables_sahara.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_sahara.yml.j2 index f356ecd614..07c3c2a3ac 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_sahara.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_sahara.yml.j2 @@ -10,5 +10,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -tempest_test_includelist: +tempest_test_includelist_sahara: - sahara_tempest_plugin.tests.api.test_job_binary_internals diff --git a/tests/roles/bootstrap-host/templates/user_variables_zun.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_zun.yml.j2 index 006b8d823a..91e2a7ec98 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_zun.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_zun.yml.j2 @@ -13,10 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -tempest_test_includelist: +tempest_test_includelist_zun: - zun_tempest_plugin.tests.tempest.api -tempest_test_excludelist: +tempest_test_excludelist_zun: - test: zun_tempest_plugin.tests.tempest.api.test_containers.TestContainer.test_run_container_with_image_driver_glance reason: This test requires direct access to the Docker daemon API on localhost - test: zun_tempest_plugin.tests.tempest.api.test_capsules.TestCapsule.test_create_capsule_full