From 6a5d90785777c5dfe9cb550a1239da3a4ccbde35 Mon Sep 17 00:00:00 2001 From: Ricardo Diaz Date: Wed, 4 Sep 2024 11:01:25 +0200 Subject: [PATCH] Allow set debug mode for Tempest This change allows to enable the debug mode for the Tempest test operator by setting `cifmw_test_operator_tempest_debug: true` in spec (false by default). It must only be set to true for debbuging purposes (e.g. when running the operator manually) because it keeps the pod (e.g .Running) sleeping infinity. --- roles/test_operator/README.md | 2 ++ roles/test_operator/defaults/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/roles/test_operator/README.md b/roles/test_operator/README.md index 929af95a8d..c088cbcb96 100644 --- a/roles/test_operator/README.md +++ b/roles/test_operator/README.md @@ -42,6 +42,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/ * `cifmw_test_operator_tempest_extra_rpms`: (List) . A list of URLs that point to RPMs that should be installed before the execution of tempest. Note that this parameter has no effect when `cifmw_test_operator_tempest_external_plugin` is used. Default value: `[]` * `cifmw_test_operator_tempest_extra_configmaps_mounts`: (List) A list of configmaps that should be mounted into the tempest test pods. Default value: `[]` * `cifmw_test_operator_tempest_config`: (Object) Definition of Tempest CRD instance that is passed to the test-operator (see [the test-operator documentation](https://openstack-k8s-operators.github.io/test-operator/crds.html#tempest-custom-resource)). Default value: +* `cifmw_test_operator_tempest_debug`: (Bool) Run Tempest in debug mode, it keeps the operator pod sleeping infinity (it must only set to `true`only for debugging purposes). Default value: `false` ``` apiVersion: test.openstack.org/v1beta1 kind: Tempest @@ -64,6 +65,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/ extraRPMs: "{{ cifmw_test_operator_tempest_extra_rpms | default([]) }}" extraImages: "{{ cifmw_test_operator_tempest_extra_images | default([]) }}" tempestconfRun: "{{ cifmw_tempest_tempestconf_config | default(omit) }}" + debug: "{{ cifmw_test_operator_tempest_debug }}" ``` ## Tobiko specific parameters diff --git a/roles/test_operator/defaults/main.yml b/roles/test_operator/defaults/main.yml index b45bdcbc4e..9ca66d03a8 100644 --- a/roles/test_operator/defaults/main.yml +++ b/roles/test_operator/defaults/main.yml @@ -86,6 +86,7 @@ cifmw_tempest_tempestconf_config_defaults: enforce_scope = false # Please refer to https://openstack-k8s-operators.github.io/test-operator/guide.html#executing-tempest-tests +cifmw_test_operator_tempest_debug: false cifmw_test_operator_tempest_config: apiVersion: test.openstack.org/v1beta1 kind: Tempest @@ -113,6 +114,7 @@ cifmw_test_operator_tempest_config: extraImages: "{{ cifmw_test_operator_tempest_extra_images | default([]) }}" tempestconfRun: "{{ cifmw_tempest_tempestconf_config_defaults | combine(cifmw_tempest_tempestconf_config | default({})) }}" workflow: "{{ cifmw_test_operator_tempest_workflow }}" + debug: "{{ cifmw_test_operator_tempest_debug }}" # Section 3: tobiko parameters - used when run_test_fw is 'tobiko' cifmw_test_operator_tobiko_registry: quay.io