From 0c842a6de7b66aa86ee6b2918f28fdd164323c89 Mon Sep 17 00:00:00 2001 From: Katarina Strenkova Date: Thu, 21 May 2026 09:11:59 -0400 Subject: [PATCH] (multiple) Set test_operator as default test role Set cifmw_run_test_role to test_operator as a default and remove redundant explicit settings from scenarios. This is an effort to deprecate the tempest role and to reduce repetition of setting this variable to test_operator almost every time. Signed-off-by: Katarina Strenkova --- docs/source/usage/01_usage.md | 2 +- group_vars/all.yml | 3 +++ playbooks/08-run-tests.yml | 2 +- playbooks/multi-namespace/ns2_validation.yaml | 2 +- roles/cifmw_setup/tasks/run_tests.yml | 2 +- roles/polarion/README.md | 2 +- roles/polarion/defaults/main.yml | 2 +- roles/reportportal/README.md | 2 +- roles/reportportal/defaults/main.yml | 2 +- scenarios/centos-9/multinode-ci.yml | 1 - scenarios/reproducers/bgp-4-racks-3-ocps.yml | 1 - scenarios/reproducers/va-common.yml | 1 - zuul.d/tempest_multinode.yaml | 1 - zuul.d/whitebox_neutron_tempest_jobs.yaml | 1 - 14 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/source/usage/01_usage.md b/docs/source/usage/01_usage.md index 100ff7018..646e658f3 100644 --- a/docs/source/usage/01_usage.md +++ b/docs/source/usage/01_usage.md @@ -53,7 +53,7 @@ are shared among multiple roles: - `cifmw_ceph_target`: (String) The Ansible inventory group where ceph is deployed. Defaults to `computes`. - `cifmw_run_tests`: (Bool) Specifies whether tests should be executed. Defaults to false. -- `cifmw_run_test_role`: (String) Specifies which ci-framework role will be used to run tests. Allowed options are `test_operator`, `tempest` and `shiftstack`. Defaults to `tempest`. +- `cifmw_run_test_role`: (String) Specifies which ci-framework role will be used to run tests. Allowed options are `test_operator` and `shiftstack`. Defaults to `test_operator`. - `cifmw_edpm_deploy_nfs`: (Bool) Specifies whether an nfs server should be deployed. - `cifmw_nfs_target`: (String) The Ansible inventory group where the nfs server is deployed. Defaults to `computes`. Only has an effect if `cifmw_edpm_deploy_nfs` is set to `true`. - `cifmw_nfs_network`: (String) The network the deployed nfs server will be accessible from. Defaults to `storage`. Only has an effect if `cifmw_edpm_deploy_nfs` is set to `true`. diff --git a/group_vars/all.yml b/group_vars/all.yml index 02cd70bfd..ffe120d51 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -44,6 +44,9 @@ cifmw_default_container_image_tag: "current-podified" cifmw_master_container_image_namespace: "podified-master-centos9" cifmw_openstack_k8s_operators_org_url: "https://github.com/openstack-k8s-operators" +# Default test role +cifmw_run_test_role: test_operator + #### Pinned external projects dependencies #### # # These variables define the source URL and version for diff --git a/playbooks/08-run-tests.yml b/playbooks/08-run-tests.yml index 656d72bc6..d95d57298 100644 --- a/playbooks/08-run-tests.yml +++ b/playbooks/08-run-tests.yml @@ -23,7 +23,7 @@ tags: - tests ansible.builtin.import_role: - name: "{{ cifmw_run_test_role | default('tempest') }}" + name: "{{ cifmw_run_test_role | default('test_operator') }}" - name: Run post_tests hooks vars: diff --git a/playbooks/multi-namespace/ns2_validation.yaml b/playbooks/multi-namespace/ns2_validation.yaml index f5f28158b..d3ce021f3 100644 --- a/playbooks/multi-namespace/ns2_validation.yaml +++ b/playbooks/multi-namespace/ns2_validation.yaml @@ -6,4 +6,4 @@ tags: - tests ansible.builtin.import_role: - name: "{{ cifmw_run_test_role | default('tempest') }}" + name: "{{ cifmw_run_test_role | default('test_operator') }}" diff --git a/roles/cifmw_setup/tasks/run_tests.yml b/roles/cifmw_setup/tasks/run_tests.yml index 64d002673..b283e2e49 100644 --- a/roles/cifmw_setup/tasks/run_tests.yml +++ b/roles/cifmw_setup/tasks/run_tests.yml @@ -9,7 +9,7 @@ tags: - tests ansible.builtin.import_role: - name: "{{ cifmw_run_test_role | default('tempest') }}" + name: "{{ cifmw_run_test_role | default('test_operator') }}" when: cifmw_run_tests | default(false) | bool - name: Run post_tests hooks diff --git a/roles/polarion/README.md b/roles/polarion/README.md index 03ff3df29..c077ca51b 100644 --- a/roles/polarion/README.md +++ b/roles/polarion/README.md @@ -4,7 +4,7 @@ Role to setup jump tool and upload XML test results to Polarion. ## Parameters * `cifmw_polarion_basedir`: (String) Base directory. Defaults to `cifmw_basedir` which defaults to `~/ci-framework-data`. * `cifmw_polarion_jump_repo_dir`: (String) Jump repo directory. Defaults to `~/ci-framework-data/polarion-jump`. -* `cifmw_polarion_jump_result_dir`: (String) Test results directory. Based on `cifmw_run_test_role` defaults to `~/ci-framework-data/tests/tempest/` or `~/ci-framework-data/tests/test_operator/`. +* `cifmw_polarion_jump_result_dir`: (String) Test results directory. Based on `cifmw_run_test_role` defaults to `~/ci-framework-data/tests/test_operator/`. * `cifmw_polarion_jump_repo_url`: (String) URL of jump repository. * `cifmw_polarion_testrun_title`: (String) A name of the test run under which the test results will be uploaded to polarion. The role appends an index number to the name to distinguish multiple test runs apart. * `cifmw_polarion_testrun_id`: (String) A test run identification provided by Polarion test case or `create-new-test-run` if polarion should generate a random test run ID. A value other than `create-new-test-run` will force this role to upload all test results found in all directories under `cifmw_polarion_jump_repo_url` to one test run identified by the given ID. The default behavior of this role is to treat the directories in `cifmw_polarion_jump_repo_url` as separate test runs. diff --git a/roles/polarion/defaults/main.yml b/roles/polarion/defaults/main.yml index 410798a85..8ae27a22a 100644 --- a/roles/polarion/defaults/main.yml +++ b/roles/polarion/defaults/main.yml @@ -21,7 +21,7 @@ cifmw_polarion_basedir: "{{ cifmw_basedir }}" cifmw_polarion_jump_custom_fields: {} cifmw_polarion_jump_repo_dir: "{{ cifmw_polarion_basedir }}/polarion-jump" -cifmw_polarion_jump_result_dir: "{{ cifmw_polarion_basedir }}/tests/{{ cifmw_run_test_role | default('tempest') }}/" +cifmw_polarion_jump_result_dir: "{{ cifmw_polarion_basedir }}/tests/{{ cifmw_run_test_role }}/" cifmw_polarion_jump_repo_branch: "master" cifmw_polarion_testrun_title: "testrun-name" cifmw_polarion_use_stage: false diff --git a/roles/reportportal/README.md b/roles/reportportal/README.md index 1f1ece9f1..f83c2eb79 100644 --- a/roles/reportportal/README.md +++ b/roles/reportportal/README.md @@ -7,7 +7,7 @@ The `reportportal` role uses Data Router tool for uploading XML test results to * `cifmw_reportportal_droute_client_url`: (String) URL of Data router client repository (mandatory). * `cifmw_reportportal_datarouter_username`: (String) username for Data router client (mandatory). * `cifmw_reportportal_datarouter_password`: (String) password for Data router client (mandatory). -* `cifmw_reportportal_datarouter_result_dir`: (String) Test results directory. Based on `cifmw_run_test_role` defaults to `~/ci-framework-data/tests/tempest/` or `~/ci-framework-data/tests/test_operator/`. One or more properly formatted xml results files are expected to be found in this directory. +* `cifmw_reportportal_datarouter_result_dir`: (String) Test results directory. Based on `cifmw_run_test_role` defaults to `~/ci-framework-data/tests/test_operator/`. One or more properly formatted xml results files are expected to be found in this directory. * `cifmw_reportportal_project`: (String) Report portal project for uploading results (mandatory). * `cifmw_reportportal_launch_name`: (String) Name of the Report portal launch defaults to `Dummy launch`. * `cifmw_reportportal_launch_description`: (String) Description of the Report portal launch defaults to `Test results sent via Data router`. diff --git a/roles/reportportal/defaults/main.yml b/roles/reportportal/defaults/main.yml index e9cef6f74..e97a97359 100644 --- a/roles/reportportal/defaults/main.yml +++ b/roles/reportportal/defaults/main.yml @@ -14,7 +14,7 @@ cifmw_reportportal_results_dir: >- {{ (cifmw_reportportal_basedir, 'tests', - cifmw_run_test_role | default('tempest')) | + cifmw_run_test_role) | path_join }} diff --git a/scenarios/centos-9/multinode-ci.yml b/scenarios/centos-9/multinode-ci.yml index 06a1cfdda..a931fb830 100644 --- a/scenarios/centos-9/multinode-ci.yml +++ b/scenarios/centos-9/multinode-ci.yml @@ -31,6 +31,5 @@ cifmw_install_yamls_vars: cifmw_deploy_edpm: true # Tempest vars -cifmw_run_test_role: test_operator cifmw_test_operator_tempest_include_list: | tempest.scenario.test_network_basic_ops.TestNetworkBasicOps diff --git a/scenarios/reproducers/bgp-4-racks-3-ocps.yml b/scenarios/reproducers/bgp-4-racks-3-ocps.yml index 1c2b9f81f..97b55e9ff 100644 --- a/scenarios/reproducers/bgp-4-racks-3-ocps.yml +++ b/scenarios/reproducers/bgp-4-racks-3-ocps.yml @@ -1,6 +1,5 @@ --- cifmw_run_tests: true -cifmw_run_test_role: test_operator cifmw_test_operator_timeout: 7200 cifmw_test_operator_tempest_include_list: | tempest.scenario.test_network_basic_ops.TestNetworkBasicOps diff --git a/scenarios/reproducers/va-common.yml b/scenarios/reproducers/va-common.yml index b5dfcc72f..4c81a8cb1 100644 --- a/scenarios/reproducers/va-common.yml +++ b/scenarios/reproducers/va-common.yml @@ -28,7 +28,6 @@ cifmw_libvirt_manager_pub_net: ocpbm # Run tests cifmw_run_tests: true -cifmw_run_test_role: test_operator cifmw_test_operator_timeout: 7200 cifmw_test_operator_tempest_include_list: | tempest.scenario.test_network_basic_ops.TestNetworkBasicOps diff --git a/zuul.d/tempest_multinode.yaml b/zuul.d/tempest_multinode.yaml index 2f0c4f90e..f1036cd81 100644 --- a/zuul.d/tempest_multinode.yaml +++ b/zuul.d/tempest_multinode.yaml @@ -13,7 +13,6 @@ # disable operator build cifmw_operator_build_meta_build: false cifmw_operator_build_operators: [] - cifmw_run_test_role: test_operator cifmw_test_operator_tempest_tests_include_override_scenario: true extra-vars: crc_ci_bootstrap_cloud_name: "{{ nodepool.cloud | replace('-nodepool-tripleo','') }}" diff --git a/zuul.d/whitebox_neutron_tempest_jobs.yaml b/zuul.d/whitebox_neutron_tempest_jobs.yaml index d378ffe1f..f94b0485e 100644 --- a/zuul.d/whitebox_neutron_tempest_jobs.yaml +++ b/zuul.d/whitebox_neutron_tempest_jobs.yaml @@ -14,7 +14,6 @@ whitebox-neutron-tempest-plugin opendev patches. It will validate the deployment by running whitebox-neutron-tempest-plugin tests. vars: - cifmw_run_test_role: test_operator cifmw_os_must_gather_timeout: "30m" cifmw_test_operator_timeout: 14400 cifmw_block_device_size: 40G