Fix tempest tests

The neutron plugins are now in a new repository, and therefore
the path to the whitelist has changed.

On top of that, the "when:" condition on the include playbook
naturally didn't trigger. There is no when on play(book)s!
Due to the fact this was ignored, we were running the tempest role
twice for a while. It didn't break, because the facts were properly
gathered, but it was suboptimal. If facts failed to gather, the
os_tempest role that gets included in the dragonflow play would fail,
and that would break the functional test (not only the dragonflow test).

The "when:" condition on plays should be removed with ansible 2.4 coming
soon anyway.

Change-Id: I4e4110683182310ca662de49ca4437ca56f9ca4c
This commit is contained in:
Jean-Philippe Evrard 2017-12-13 13:08:40 +00:00
parent 962cd92243
commit 3db2ebb1b6
9 changed files with 36 additions and 12 deletions

View File

@ -19,9 +19,12 @@ tempest_plugins:
- name: neutron - name: neutron
repo: https://git.openstack.org/openstack/neutron repo: https://git.openstack.org/openstack/neutron
branch: master branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - "neutron_tempest_plugin.api.test_networks*"
tempest_private_net_provider_type: "local" tempest_private_net_provider_type: "local"
tempest_private_net_seg_id: '' tempest_private_net_seg_id: ''

View File

@ -29,9 +29,12 @@ tempest_plugins:
- name: dragonflow - name: dragonflow
repo: https://git.openstack.org/openstack/dragonflow repo: https://git.openstack.org/openstack/dragonflow
branch: master branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - "neutron_tempest_plugin.api.test_networks*"
dragonflow_fullstack_failing_tests: dragonflow_fullstack_failing_tests:
- dragonflow.tests.fullstack.test_db_consistent.TestDbConsistent.test_db_consistent - dragonflow.tests.fullstack.test_db_consistent.TestDbConsistent.test_db_consistent

View File

@ -35,6 +35,9 @@ tempest_plugins:
- name: neutron - name: neutron
repo: https://git.openstack.org/openstack/neutron repo: https://git.openstack.org/openstack/neutron
branch: master branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - "neutron_tempest_plugin.api.test_networks*"

View File

@ -31,6 +31,9 @@ tempest_plugins:
- name: neutron - name: neutron
repo: https://git.openstack.org/openstack/neutron repo: https://git.openstack.org/openstack/neutron
branch: master branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - "neutron_tempest_plugin.api.test_networks*"

View File

@ -10,9 +10,12 @@ tempest_plugins:
- name: neutron - name: neutron
repo: https://git.openstack.org/openstack/neutron repo: https://git.openstack.org/openstack/neutron
branch: master branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - "neutron_tempest_plugin.api.test_networks*"
neutron_plugin_type: ml2.ovs neutron_plugin_type: ml2.ovs
neutron_local_ip: "{{ ansible_host }}" neutron_local_ip: "{{ ansible_host }}"

View File

@ -19,9 +19,12 @@ tempest_plugins:
- name: neutron - name: neutron
repo: https://git.openstack.org/openstack/neutron repo: https://git.openstack.org/openstack/neutron
branch: master branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - "neutron_tempest_plugin.api.test_networks*"
haproxy_ssl: false haproxy_ssl: false
external_lb_vip_address: 10.1.0.1 external_lb_vip_address: 10.1.0.1

View File

@ -25,6 +25,8 @@
- calico-dhcp-age - calico-dhcp-age
tags: tags:
- skip_ansible_lint - skip_ansible_lint
when:
- "neutron_plugin_type == 'ml2.calico'"
- name: Ensure that the Calico Felix agent is alive - name: Ensure that the Calico Felix agent is alive
command: openstack --os-cloud default network agent list -f json command: openstack --os-cloud default network agent list -f json
@ -41,6 +43,8 @@
run_once: yes run_once: yes
tags: tags:
- skip_ansible_lint - skip_ansible_lint
when:
- "neutron_plugin_type == 'ml2.calico'"
vars_files: vars_files:
- common/test-vars.yml - common/test-vars.yml

View File

@ -17,8 +17,6 @@
hosts: physical_host hosts: physical_host
user: root user: root
gather_facts: true gather_facts: true
roles:
- role: "{{ tempest_rolename | default('os_tempest') }}"
post_tasks: post_tasks:
- name: Run Dragonflow fullstack tests - name: Run Dragonflow fullstack tests
shell: | shell: |
@ -33,11 +31,15 @@
register: dragonflow_fullstack_tests register: dragonflow_fullstack_tests
tags: tags:
- skip_ansible_lint - skip_ansible_lint
when:
- "neutron_plugin_type == 'ml2.dragonflow'"
- name: Ensure etc folder exists in logs - name: Ensure etc folder exists in logs
file: file:
path: /var/log/etc path: /var/log/etc
state: directory state: directory
when:
- "neutron_plugin_type == 'ml2.dragonflow'"
- name: Copy config files - name: Copy config files
shell: | shell: |
@ -45,6 +47,8 @@
register: dragonflow_fullstack_log_copy register: dragonflow_fullstack_log_copy
tags: tags:
- skip_ansible_lint - skip_ansible_lint
when:
- "neutron_plugin_type == 'ml2.dragonflow'"
- name: Verify tests have passed - name: Verify tests have passed
shell: | shell: |
@ -53,6 +57,8 @@
exit $? exit $?
tags: tags:
- skip_ansible_lint - skip_ansible_lint
when:
- "neutron_plugin_type == 'ml2.dragonflow'"
vars_files: vars_files:
- common/test-vars.yml - common/test-vars.yml

View File

@ -35,9 +35,5 @@
- include: common/test-install-tempest.yml - include: common/test-install-tempest.yml
- include: test-calico-functional.yml - include: test-calico-functional.yml
when:
- "neutron_plugin_type == 'ml2.calico'"
- include: test-dragonflow-functional.yml - include: test-dragonflow-functional.yml
when:
- "neutron_plugin_type == 'ml2.dragonflow'"