Skip to content
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
1 change: 1 addition & 0 deletions roles/test_operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Default value: {}
* `cifmw_test_operator_tobiko_image_tag`: (String) Tag for the `cifmw_test_operator_tobiko_image`. Default value: `{{ cifmw_test_operator_default_image_tag }}`
* `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`
* `cifmw_test_operator_tobiko_version`: (String) Tobiko version to install. It could refer to a branch (master, osp-16.2), a tag (0.6.x, 0.7.x) or an sha-1. Default value: `master`
* `cifmw_test_operator_tobiko_patch`: (Dict) A specific Git patch to apply to the Tobiko repository. This feature expects both `repository` and `refspec` to be defined. Default value: `{}`
* `cifmw_test_operator_tobiko_pytest_addopts`: (String) `PYTEST_ADDOPTS` env variable with input pytest args. Example: `-m <markers> --maxfail <max-failed-tests> --skipregex <regex>`. Defaults to `null`. In case of `null` value, `PYTEST_ADDOPTS` is not set (tobiko tests are executed without any extra pytest options).
* `cifmw_test_operator_tobiko_prevent_create`: (Boolean) Sets the value of the env variable `TOBIKO_PREVENT_CREATE` that specifies whether tobiko scenario tests create new resources or expect that those resource had been created before. Default to `null`. In case of `null` value, `TOBIKO_PREVENT_CREATE` is not set (tobiko tests create new resources).
* `cifmw_test_operator_tobiko_num_processes`: (Integer) Sets the value of the env variable `TOX_NUM_PROCESSES` that is used to run pytest with `--numprocesses $TOX_NUM_PROCESSES`. Defaults to `null`. In case of `null` value, `TOX_NUM_PROCESSES` is not set (tobiko internally uses the value `auto`, see pytest documentation about the `--numprocesses` option).
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 @@ -179,6 +179,7 @@ cifmw_test_operator_tobiko_image: "{{ stage_vars_dict.cifmw_test_operator_tobiko
cifmw_test_operator_tobiko_image_tag: "{{ cifmw_test_operator_default_image_tag }}"
cifmw_test_operator_tobiko_testenv: scenario
cifmw_test_operator_tobiko_version: master
cifmw_test_operator_tobiko_patch: {}
cifmw_test_operator_tobiko_pytest_addopts: null
cifmw_test_operator_tobiko_prevent_create: null
cifmw_test_operator_tobiko_num_processes: null
Expand Down Expand Up @@ -206,6 +207,7 @@ cifmw_test_operator_tobiko_config:
containerImage: "{{ stage_vars_dict.cifmw_test_operator_tobiko_image }}:{{ stage_vars_dict.cifmw_test_operator_tobiko_image_tag }}"
testenv: "{{ stage_vars_dict.cifmw_test_operator_tobiko_testenv }}"
version: "{{ stage_vars_dict.cifmw_test_operator_tobiko_version }}"
patch: "{{ stage_vars_dict.cifmw_test_operator_tobiko_patch | default(omit) }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest either having only default(omit) and no default value on line 182 or default({}). Not sure which approach is better but right now it's redundant to set it 2 times. To me it looks like default(omit) is better, but will wait for other reviews.

@danpawlik Could you perhaps review this?

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 }}"
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
Expand Down