Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow set debug mode for Tempest #2307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions roles/test_operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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
Expand All @@ -66,6 +67,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
Expand Down
2 changes: 2 additions & 0 deletions roles/test_operator/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a proper data structure, I'm wondering if we shouldn't:

  • push a cifmw_test_operator_tempest_default_config in vars/main.yml
  • update cifmw_test_operator_tempest_config to be mostly empty
  • combine both dict before generating the configuration file

That way, we could get something really nice and provide a better interface. Avoiding that kind of PR.

Any thoughts?

apiVersion: test.openstack.org/v1beta1
kind: Tempest
Expand Down Expand Up @@ -115,6 +116,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
Expand Down