From 0f4a43e0d367fb236ed53b32d68e8d6134d4da82 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Wed, 25 Sep 2024 11:10:32 +0200 Subject: [PATCH] Add tempest cleanup opt Allow users to enable tempest cleanup feature defined in the tempest image. https://github.com/openstack-k8s-operators/tcib/pull/208 https://github.com/openstack-k8s-operators/test-operator/pull/207 --- roles/test_operator/README.md | 1 + roles/test_operator/defaults/main.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/roles/test_operator/README.md b/roles/test_operator/README.md index 83adf6cf09..7b1726b2b5 100644 --- a/roles/test_operator/README.md +++ b/roles/test_operator/README.md @@ -11,6 +11,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/ * `cifmw_test_operator_logs_image`: (String) Image that should be used to collect logs from the pods spawned by the test-operator. Default value: `quay.io/quay/busybox` * `cifmw_test_operator_concurrency`: (Integer) Tempest concurrency value. Default value: `8` * `cifmw_test_operator_cleanup`: (Bool) Delete all resources created by the role at the end of the testing. Default value: `false` +* `cifmw_test_operator_tempest_cleanup`: (Bool) Run tempest cleanup after test execution (tempest run) to delete any resources created by tempest that may have been left out. * `cifmw_test_operator_default_groups`: (List) List of groups in the include list to search for tests to be executed. Default value: `[ 'default' ]` * `cifmw_test_operator_default_jobs`: (List) List of jobs in the exclude list to search for tests to be excluded. Default value: `[ 'default' ]` * `cifmw_test_operator_dry_run`: (Boolean) Whether test-operator should run or not. Default value: `false` diff --git a/roles/test_operator/defaults/main.yml b/roles/test_operator/defaults/main.yml index da88f8ab44..5e396c8c9a 100644 --- a/roles/test_operator/defaults/main.yml +++ b/roles/test_operator/defaults/main.yml @@ -48,6 +48,7 @@ cifmw_test_operator_tempest_network_attachments: [] cifmw_test_operator_tempest_tests_include_override_scenario: false cifmw_test_operator_tempest_tests_exclude_override_scenario: false cifmw_test_operator_tempest_workflow: [] +cifmw_test_operator_tempest_cleanup: false # Enabling SRBAC by default, in jobs where this does not make sense should be turned off explicitly # @@ -117,6 +118,7 @@ cifmw_test_operator_tempest_config: extraRPMs: "{{ cifmw_test_operator_tempest_extra_rpms | default([]) }}" extraImages: "{{ cifmw_test_operator_tempest_extra_images | default([]) }}" tempestconfRun: "{{ cifmw_tempest_tempestconf_config_defaults | combine(cifmw_tempest_tempestconf_config | default({})) }}" + cleanup: "{{ cifmw_test_operator_tempest_cleanup }}" workflow: "{{ cifmw_test_operator_tempest_workflow }}" # Section 3: tobiko parameters - used when run_test_fw is 'tobiko'