Use constraints when creating tempest venv

When running tempest we run in-tree tests as well. Lots of these
tests including tempest tests may not work with new client
libraries. Let's use the relevant branch upper constraints when
running functional tests.

Change-Id: I6a8cffdc86c895eebe4269c5cd37841325566c54
This commit is contained in:
ramishra 2021-07-30 09:23:05 +05:30 committed by rabi
parent 8c91934062
commit 22c48f57bb
2 changed files with 24 additions and 2 deletions

View File

@ -1,2 +1,5 @@
devstack_base_dir: /opt/stack
tempest_test_timeout: ''
tempest_tox_environment: {}
heat_tempest_plugin: /opt/stack/heat-tempest-plugin
constraints_file: /opt/stack/requirements/upper-constraints.txt

View File

@ -1,3 +1,23 @@
- name: Set OS_TEST_TIMEOUT if requested
set_fact:
tempest_tox_environment: "{{ tempest_tox_environment | combine({'OS_TEST_TIMEOUT': tempest_test_timeout}) }}"
when: tempest_test_timeout != ''
- name: Set TOX_CONSTRAINTS_FILE
set_fact:
tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': constraints_file}) | combine({'TOX_CONSTRAINTS_FILE': constraints_file}) }}"
- name: Allow git to read plugin directories
become: true
command: git config --system --add safe.directory {{heat_tempest_plugin}}
- name: Install plugins
command: tox -evenv-tempest -- pip install -c{{constraints_file}} {{heat_tempest_plugin}}
become: true
args:
chdir: "{{devstack_base_dir}}/tempest"
environment: "{{ tempest_tox_environment }}"
- name: Run heat tests
command: tox -evenv-tempest -- stestr --test-path={{devstack_base_dir}}/heat/heat_integrationtests \
--top-dir={{devstack_base_dir}}/heat \
@ -5,5 +25,4 @@
args:
chdir: "{{devstack_base_dir}}/tempest"
become: true
become_user: tempest
environment: '{{ {"OS_TEST_TIMEOUT": tempest_test_timeout} if tempest_test_timeout else {} }}'
environment: "{{ tempest_tox_environment }}"