Merge "Rename whitelist and blacklist in role"

This commit is contained in:
Zuul 2021-06-15 00:40:51 +00:00 committed by Gerrit Code Review
commit 58c5fab84c
5 changed files with 32 additions and 23 deletions

View File

@ -87,29 +87,32 @@ tempest_plugins: "{{ _tempest_plugins.values() | sum(start=[]) | selectattr('ins
# tempest_workspace where tempest can be runned
tempest_workspace: "{{ ansible_facts['env']['HOME'] }}/workspace"
# The location where the test whitelist/blacklist will be placed
tempest_test_whitelist_file_path: "{{ tempest_workspace }}/etc/tempest_whitelist.txt"
tempest_test_blacklist_file_path: "{{ tempest_workspace }}/etc/tempest_blacklist.txt"
# The location where the test include/exclude lists will be placed
tempest_test_includelist_file_path: "{{ tempest_workspace }}/etc/tempest_includelist.txt"
tempest_test_excludelist_file_path: "{{ tempest_workspace }}/etc/tempest_excludelist.txt"
# Tests to execute:
# This sets up a list of tests to execute based on what's deployed in the environment.
# The list gets added to the whitelist which tempest executes.
tempest_test_whitelist:
# The list gets added to the includelist which tempest executes.
# Defaults to tempest_test_whitelist for backwards compatibility and migration purposes.
tempest_test_includelist: "{{ tempest_test_whitelist | default(tempest_test_default_includelist) }}"
tempest_test_default_includelist:
- "smoke"
- "{{ (tempest_service_available_ceilometer | bool) | ternary('tempest.api.telemetry', '') }}"
- "{{ (tempest_service_available_heat | bool) | ternary('tempest.api.orchestration.stacks.test_non_empty_stack', '') }}"
# Tests being skipped by os_tempest
# Example:
# tempest_test_blacklist:
# tempest_test_excludelist:
# - test: tempest.scenario.test.minimum_basic
# reason: This test is failing
# lp: 'https://bugs.launchpad.net/openstack-ansible/+bug/123456'
# bz: 'https://bugzilla.redhat.com/show_bug.cgi?id=123456'
# OR
# tempest_test_blacklist:
# tempest_test_excludelist:
# - 'tempest.scenario.test.minimum_basic'
tempest_test_blacklist: []
# Defaults to tempest_test_blacklist for backwards compatibility and migration purposes.
tempest_test_excludelist: "{{ tempest_test_blacklist | default([]) }}"
# Toggle fatal deprecations
tempest_fatal_deprecations: False

View File

@ -0,0 +1,6 @@
---
deprecations:
- Renamed ``tempest_test_whitelist`` to ``tempest_test_includelist`` and
``tempest_test_blacklist`` to ``tempest_test_excludelist``
Dependant projects should update to use the new variables

View File

@ -153,32 +153,32 @@
when: "debug | bool"
changed_when: false
- name: Generate tempest test whitelist
- name: Generate tempest test include list
copy:
content: |
{% for item in tempest_test_whitelist | unique | sort %}
{% for item in tempest_test_includelist | unique | sort %}
{% if item %}
{{ item }}
{% endif %}
{% endfor %}
dest: "{{ tempest_test_whitelist_file_path }}"
dest: "{{ tempest_test_includelist_file_path }}"
mode: "0644"
when:
- tempest_test_whitelist | length > 0
- tempest_test_includelist | length > 0
# Tests to NOT execute:
# This sets up a list of tests to skip, which can even include those included in the whitelist.
- name: Generate tempest test blacklist
- name: Generate tempest test exclude list
copy:
content: |
{% for item in tempest_test_blacklist %}
{% for item in tempest_test_excludelist %}
{% if item.test is defined %}
{{ item.test }}
{% else %}
{{ item }}
{% endif %}
{% endfor %}
dest: "{{ tempest_test_blacklist_file_path }}"
dest: "{{ tempest_test_excludelist_file_path }}"
mode: "0644"
when:
- tempest_test_blacklist | length > 0
- tempest_test_excludelist | length > 0

View File

@ -30,10 +30,10 @@
{% if tempest_test_worker_file_path is defined %}
--worker-file {{ tempest_test_worker_file_path }} \
{% endif %}
{% if tempest_test_blacklist | length > 0 %}
--blacklist-file {{ tempest_test_blacklist_file_path }} \
{% if tempest_test_excludelist | length > 0 %}
--exclude-list {{ tempest_test_excludelist_file_path }} \
{% endif %}
--whitelist-file {{ tempest_test_whitelist_file_path }} > {{ tempest_log_dir }}/tempest_run.log
--include-list {{ tempest_test_includelist_file_path }} > {{ tempest_log_dir }}/tempest_run.log
args:
chdir: "{{ tempest_workspace }}"
executable: /bin/bash
@ -108,9 +108,9 @@
. {{ tempest_venv_bin }}/activate
fi
tempest run \
--whitelist-file {{ tempest_test_whitelist_file_path }} \
{% if tempest_test_blacklist | length > 0 %}
--blacklist-file {{ tempest_test_blacklist_file_path }} \
--include-list {{ tempest_test_includelist_file_path }} \
{% if tempest_test_excludelist | length > 0 %}
--exclude-list {{ tempest_test_excludelist_file_path }} \
{% endif %}
--list-tests &> {{ tempest_log_dir }}/test_list.txt
args:

View File

@ -33,7 +33,7 @@
use_os_tempest: true
tempest_tempest_conf_overrides:
auth.use_dynamic_credentials: true
tempest_test_whitelist:
tempest_test_includelist:
- 'tempest.api.identity.v3'
- 'tempest.scenario.test_server_basic_ops'
- 'tempest.api.volume.admin.test_multi_backend'