
The review: * adds a python3 job in order to test the refstack-client with python3 as well. * adds a job which runs unit tests by python3.7 * changes default python3 (when -p 3 is specified) in setup_env script to version 3.6.0 * converts downloaded list of tests from bytes to str in order to unify the types used for python2 and python3 compatibility. * edits -p argument in the setup_env script so that it also accepts a full version of Python a user wants to run with, before there were 2 options: * python2.7.8 * python3.6.0 * sets object-storage.operator_role to Member in tempest.conf in order to run tempest.api.object_storage.test_container_services.ContainerTest tests Change-Id: I961f0f093bd7d40fde7e448ea12ef9907c61d126
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
- block:
|
|
# python-tempestconf's source code is placed by zuul at the same level
|
|
# as refstack-client's code, so when the task changes dir to
|
|
# refstack-client's folder, python-tempestconf is located one folder above
|
|
- name: Install refstack-client and python-tempestconf
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
./setup_env -c master -s ../python-tempestconf {{ python_3_args | default('') }}
|
|
args:
|
|
chdir: "{{ refstack_client_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Print Tempest account file
|
|
shell: |
|
|
set -ex
|
|
cat /etc/openstack/accounts.yaml
|
|
|
|
- name: Generate tempest configuration file
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source .venv/bin/activate
|
|
{{ source_credentials_commands }}
|
|
printenv
|
|
refstack-client config \
|
|
--use-test-accounts /etc/openstack/accounts.yaml \
|
|
--out /tmp/tempest.conf
|
|
args:
|
|
chdir: "{{ refstack_client_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Print generated tempest.conf
|
|
shell: |
|
|
set -ex
|
|
cat /tmp/tempest.conf
|
|
|
|
- name: Run refstack-client tests
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source .venv/bin/activate
|
|
printenv
|
|
refstack-client test -c /tmp/tempest.conf \
|
|
-v --test-list "https://refstack.openstack.org/api/v1/guidelines/2018.02/tests?target=platform&type=required&alias=true&flag=false"
|
|
args:
|
|
chdir: "{{ refstack_client_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
vars:
|
|
refstack_client_src_relative_path: "{{ zuul.projects['opendev.org/openstack/refstack-client'].src_dir }}"
|