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('') }}