Fix: do not lose the tox_environment value in func tests
The current code always overrides tox_environment when running functional tests, but the correct behavior is to add the discovered environment variables to tox_environments, while keeping the user-specified value for it. The current behavior breaks the devstack-tox-functional children jobs, like openstacksdk-functional-devstack-ironic, which set tox_environment. Change-Id: I5dc9054a1495ca0ef7745c08316441ab153956f4
This commit is contained in:
parent
8e74a617df
commit
906d824a19
@ -8,5 +8,4 @@
|
|||||||
- test-setup
|
- test-setup
|
||||||
- ensure-tox
|
- ensure-tox
|
||||||
- get-devstack-os-environment
|
- get-devstack-os-environment
|
||||||
- role: tox
|
- tox
|
||||||
tox_environment: "{{ os_env_vars|default({}) }}"
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- get-devstack-os-environment
|
- get-devstack-os-environment
|
||||||
- role: tox
|
- tox
|
||||||
tox_environment: "{{ os_env_vars|default({}) }}"
|
|
||||||
|
@ -3,3 +3,4 @@ openrc_file: "{{ devstack_base_dir }}/devstack/openrc"
|
|||||||
openrc_user: admin
|
openrc_user: admin
|
||||||
openrc_project: admin
|
openrc_project: admin
|
||||||
openrc_enable_export: false
|
openrc_enable_export: false
|
||||||
|
tox_environment: {}
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
executable: "/bin/bash"
|
executable: "/bin/bash"
|
||||||
register: env_os
|
register: env_os
|
||||||
|
|
||||||
- name: Save the OS_ environment variables as a fact
|
- name: Append the the OS_ environment variables to tox_environment
|
||||||
set_fact:
|
set_fact:
|
||||||
os_env_vars: "{{ env_os.stdout|from_yaml }}"
|
tox_environment: "{{ env_os.stdout|from_yaml|default({})|combine(tox_environment) }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user