From 69d33b455298fd9972456ef4c1ce76c6859b3cff Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Mon, 30 Dec 2024 15:03:11 +0530 Subject: [PATCH] Add possibility to run HorizonTest in debug mode This patch adds support in the test-operator role to run HorizonTest tests in the debug mode (same as already is there for Tempest). --- 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 9438011033..e21aad0599 100644 --- a/roles/test_operator/README.md +++ b/roles/test_operator/README.md @@ -210,6 +210,7 @@ Default value: {} * `cifmw_test_operator_horizontest_flavor_name`: (String) The name of the OpenStack flavor to create for Horizon tests. Default value: `m1.tiny` * `cifmw_test_operator_horizontest_logs_directory_name`: (String) The name of the directory to store test logs. Default value: `horizon` * `cifmw_test_operator_horizontest_horizon_test_dir`: (String) The directory path for Horizon tests. Default value: `/var/lib/horizontest` +* `cifmw_test_operator_horizontest_debug`: (Bool) Run HorizonTest in debug mode, it keeps the operator pod sleeping infinitely (it must only set to `true` only for debugging purposes). Default value: `false` * `cifmw_test_operator_horizontest_config`: (Dict) Definition of HorizonTest CR instance that is passed to the test-operator (see [the test-operator documentation](https://openstack-k8s-operators.github.io/test-operator/crds.html#horizontest-custom-resource)). Default value: ``` apiVersion: test.openstack.org/v1beta1 @@ -231,6 +232,7 @@ Default value: {} password: "{{ cifmw_test_operator_horizontest_password }}" flavorName: "{{ cifmw_test_operator_horizontest_flavor_name }}" logsDirectoryName: "{{ cifmw_test_operator_horizontest_logs_directory_name }}" + debug: "{{ cifmw_test_operator_horizontest_debug }}" horizonTestDir: "{{ cifmw_test_operator_horizontest_horizon_test_dir }}" ``` diff --git a/roles/test_operator/defaults/main.yml b/roles/test_operator/defaults/main.yml index 8d81a1f8a0..f562e4c3dd 100644 --- a/roles/test_operator/defaults/main.yml +++ b/roles/test_operator/defaults/main.yml @@ -249,6 +249,7 @@ cifmw_test_operator_horizontest_user: "horizontest" cifmw_test_operator_horizontest_password: "horizontest" cifmw_test_operator_horizontest_flavor_name: "m1.tiny" cifmw_test_operator_horizontest_logs_directory_name: "horizon" +cifmw_test_operator_horizontest_debug: false cifmw_test_operator_horizontest_horizon_test_dir: "/var/lib/horizontest" cifmw_test_operator_horizontest_config: apiVersion: test.openstack.org/v1beta1 @@ -273,4 +274,5 @@ cifmw_test_operator_horizontest_config: password: "{{ stage_vars_dict.cifmw_test_operator_horizontest_password }}" flavorName: "{{ stage_vars_dict.cifmw_test_operator_horizontest_flavor_name }}" logsDirectoryName: "{{ stage_vars_dict.cifmw_test_operator_horizontest_logs_directory_name }}" + debug: "{{ cifmw_test_operator_horizontest_debug }}" horizonTestDir: "{{ stage_vars_dict.cifmw_test_operator_horizontest_horizon_test_dir }}"