Skip to content

Commit

Permalink
Add possibility to run Tobiko in debug mode
Browse files Browse the repository at this point in the history
This patch adds support in the `test-operator` role to run Tobiko
tests in the debug mode (same as already is there for Tempest).

Related: TOBIKO-100
  • Loading branch information
slawqo authored and openshift-merge-bot[bot] committed Nov 29, 2024
1 parent 474f028 commit be20061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/test_operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
* `cifmw_test_operator_tobiko_override_conf`: (Dict) Overrides the default configuration from `cifmw_test_operator_tobiko_default_conf` that is used to generate the tobiko.conf file. Default value: empty dictionary
* `cifmw_test_operator_tobiko_ssh_keytype`: (String) Type of ssh key that tobiko will use to connect to the VM instances it creates. Defaults to `cifmw_ssh_keytype` which default to `ecdsa`.
* `cifmw_test_operator_tobiko_ssh_keysize`: (Integer) Size of ssh key that tobiko will use to connect to the VM instances it creates. Defaults to `cifmw_ssh_keysize` which defaults to 521.
* `cifmw_test_operator_tobiko_debug`: (Bool) Run Tobiko in debug mode, it keeps the operator pod sleeping infinity (it must only set to `true`only for debugging purposes). Default value: `false`
* `cifmw_test_operator_tobiko_network_attachments`: (List) List of network attachment definitions to attach to the tobiko pods spawned by test-operator. Default value: `[]`.
* `cifmw_test_operator_tobiko_workflow`: (List) Definition of a Tobiko workflow that consists of multiple steps. Each step can contain all values from Spec section of [Tobiko CR](https://openstack-k8s-operators.github.io/test-operator/crds.html#tobiko-custom-resource).
* `cifmw_test_operator_tobiko_config`: (Dict) Definition of Tobiko CRD instance that is passed to the test-operator (see [the test-operator documentation](https://openstack-k8s-operators.github.io/test-operator/crds.html#tobiko-custom-resource)). Default value:
Expand All @@ -109,6 +110,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
networkAttachments: "{{ cifmw_test_operator_tobiko_network_attachments }}"
debug: "{{ cifmw_test_operator_tobiko_debug }}"
# preventCreate: preventCreate is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_prevent_create
# numProcesses: numProcesses is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_num_processes
# privateKey: privateKey is automatically generated by the test_operator role
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 @@ -147,6 +147,7 @@ cifmw_test_operator_tobiko_override_conf: {}
cifmw_test_operator_tobiko_kubeconfig_secret: tobiko-secret
cifmw_test_operator_tobiko_ssh_keytype: "{{ cifmw_ssh_keytype | default('ecdsa') }}"
cifmw_test_operator_tobiko_ssh_keysize: "{{ cifmw_ssh_keysize | default(521) }}"
cifmw_test_operator_tobiko_debug: false
cifmw_test_operator_tobiko_network_attachments: []
cifmw_test_operator_tobiko_workflow: []
cifmw_test_operator_tobiko_config:
Expand All @@ -166,6 +167,7 @@ cifmw_test_operator_tobiko_config:
pytestAddopts: "{{ cifmw_test_operator_tobiko_pytest_addopts if cifmw_test_operator_tobiko_pytest_addopts is not none else omit }}"
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
debug: "{{ cifmw_test_operator_tobiko_debug }}"
networkAttachments: "{{ cifmw_test_operator_tobiko_network_attachments }}"
# preventCreate: preventCreate is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_prevent_create
# numProcesses: numProcesses is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_num_processes
Expand Down

0 comments on commit be20061

Please sign in to comment.