From bb3a6f2f07856775853a00bbd63e12a8c5b1d1a1 Mon Sep 17 00:00:00 2001 From: lkuchlan Date: Mon, 15 Feb 2021 21:05:59 +0200 Subject: [PATCH] Add support for tempest plugins This patch allows installation of tempest plugins by using "refstack_tempest_plugins" parameter. Change-Id: Ibb0c5381b0f63e9663ecc84f3d24a448450e2b38 --- infrared_plugin/plugin.spec | 6 ++++++ tasks/install-refstack-client.yaml | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/infrared_plugin/plugin.spec b/infrared_plugin/plugin.spec index 6d0297c..b04f9da 100644 --- a/infrared_plugin/plugin.spec +++ b/infrared_plugin/plugin.spec @@ -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 diff --git a/tasks/install-refstack-client.yaml b/tasks/install-refstack-client.yaml index 07d3439..19eef4e 100644 --- a/tasks/install-refstack-client.yaml +++ b/tasks/install-refstack-client.yaml @@ -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: + # : ===> 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('') }}