Add support for tempest plugins

This patch allows installation of tempest plugins
by using "refstack_tempest_plugins" parameter.

Change-Id: Ibb0c5381b0f63e9663ecc84f3d24a448450e2b38
This commit is contained in:
lkuchlan 2021-02-15 21:05:59 +02:00
parent 56698291b1
commit bb3a6f2f07
2 changed files with 27 additions and 0 deletions

View File

@ -89,3 +89,9 @@ subparsers:
type: Value
help: |
A path or a link to a cirros image.
refstack_tempest_plugins:
type: KeyValueList
help: |
Openstack services names with branch or tag for installing the
tempest plugins that associated with them.
Usage: --refstack_tempest_plugins manila:1.3.0,cinder:master

View File

@ -25,6 +25,27 @@
python3_param: "-p 3"
when: python3_is_available.rc == 0
- when: refstack_tempest_plugins is defined
block:
# refstack-client allows installation of additional packages to find more
# tests by tempest. The additional tempest plugins should be defined in
# "tempest-additional-requirements.txt" file. This block enables this
# option by using "refstack_tempest_plugins" parameter.
# Usage:
# refstack_tempest_plugins: ===> refstack_tempest_plugins:
# <tempest_plugin_name>:<tag/branch> ===> manila:1.3.0
- name: Add additional requirements for external test suites
replace:
path: "{{ refstack_client_source }}/setup_env"
regexp: '#(.*tempest-additional-requirements.txt$)'
replace: '\1'
- name: Add tempest plugins to tempest-additional-requirements.txt
lineinfile:
path: "{{ refstack_client_source }}/tempest-additional-requirements.txt"
line: "git+https://opendev.org/openstack/{{ item.key }}-tempest-plugin.git@{{ item.value }}"
with_dict: "{{ refstack_tempest_plugins }}"
- name: Install refstack-client
shell: >
./setup_env {{ python3_param | default('') }}