Skip to content

Commit e85df24

Browse files
kstrenkovadanpawlik
authored andcommitted
[test_operator] Expose new SkipRegexList parameter
This change exposes a newly added parameter for Tobiko custom resource, the SkipRegexList. It is a list of name patterns of tests that should be skipped. Signed-off-by: Katarina Strenkova <kstrenko@redhat.com>
1 parent 4029d0d commit e85df24

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

roles/test_operator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Default value: {}
108108
* `cifmw_test_operator_tobiko_pytest_addopts`: (String) `PYTEST_ADDOPTS` env variable with input pytest args. Example: `-m <markers> --maxfail <max-failed-tests> --skipregex <regex>`. Default value: `null`. In case of `null` value, `PYTEST_ADDOPTS` is not set (tobiko tests are executed without any extra pytest options).
109109
* `cifmw_test_operator_tobiko_registry`: (String) The registry where to pull tobiko container. Default value: `{{ cifmw_test_operator_default_registry }}`
110110
* `cifmw_test_operator_tobiko_resources`: (Dict) A dictionary that specifies resources (cpu, memory) for the test pods. When kept untouched it defaults to the resource limits specified on the test-operator side. Default value: `{}`
111+
* `cifmw_test_operator_tobiko_skip_regex_list`: (List) List of test name patterns to skip during execution. Converted to `pattern1|pattern2|...` format and passed to pytest `--skipregex` option. Alternative to manually constructing regex in `pytestAddopts`. Default value: `[]`
111112
* `cifmw_test_operator_tobiko_ssh_keysize`: (Integer) Size of ssh key that tobiko will use to connect to the VM instances it creates. Default value: `{{ cifmw_ssh_keysize | default(521) }}`
112113
* `cifmw_test_operator_tobiko_ssh_keytype`: (String) Type of ssh key that tobiko will use to connect to the VM instances it creates. Default value: `{{ cifmw_ssh_keytype | default('ecdsa') }}`
113114
* `cifmw_test_operator_tobiko_testenv`: (String) Executed tobiko testenv. See tobiko `tox.ini` file for further details. Some allowed values: scenario, sanity, faults, neutron, octavia, py3, etc. Default value: `scenario`

roles/test_operator/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ cifmw_test_operator_tobiko_version: master
184184
cifmw_test_operator_tobiko_pytest_addopts: null
185185
cifmw_test_operator_tobiko_prevent_create: null
186186
cifmw_test_operator_tobiko_num_processes: null
187+
cifmw_test_operator_tobiko_skip_regex_list: []
187188
cifmw_test_operator_tobiko_advanced_image_url: "https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci/releases/download/v1.0.0/tobiko-custom-v1.0.0.qcow2"
188189
cifmw_test_operator_tobiko_override_conf: {}
189190
cifmw_test_operator_tobiko_kubeconfig_secret: tobiko-secret
@@ -210,6 +211,7 @@ cifmw_test_operator_tobiko_config:
210211
version: "{{ stage_vars_dict.cifmw_test_operator_tobiko_version }}"
211212
patch: "{{ stage_vars_dict.cifmw_test_operator_tobiko_patch | default(omit) }}"
212213
pytestAddopts: "{{ stage_vars_dict.cifmw_test_operator_tobiko_pytest_addopts if stage_vars_dict.cifmw_test_operator_tobiko_pytest_addopts is not none else omit }}"
214+
skipRegexList: "{{ stage_vars_dict.cifmw_test_operator_tobiko_skip_regex_list }}"
213215
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
214216
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
215217
debug: "{{ stage_vars_dict.cifmw_test_operator_tobiko_debug }}"

0 commit comments

Comments
 (0)