From 3db2ebb1b6d0065cf00c0e9d539ca086d367541b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Wed, 13 Dec 2017 13:08:40 +0000 Subject: [PATCH] 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 --- tests/neutron-overrides-calico.yml | 5 ++++- tests/neutron-overrides-dragonflow.yml | 5 ++++- tests/neutron-overrides-opendaylight.yml | 5 ++++- tests/neutron-overrides-ovs-nsh.yml | 5 ++++- tests/neutron-overrides-ovs.yml | 5 ++++- tests/os_neutron-overrides.yml | 5 ++++- tests/test-calico-functional.yml | 4 ++++ tests/test-dragonflow-functional.yml | 10 ++++++++-- tests/test.yml | 4 ---- 9 files changed, 36 insertions(+), 12 deletions(-) diff --git a/tests/neutron-overrides-calico.yml b/tests/neutron-overrides-calico.yml index 22f261da..dc6d22fb 100644 --- a/tests/neutron-overrides-calico.yml +++ b/tests/neutron-overrides-calico.yml @@ -19,9 +19,12 @@ tempest_plugins: - name: neutron repo: https://git.openstack.org/openstack/neutron branch: master + - name: neutron-plugins + repo: https://git.openstack.org/openstack/neutron-tempest-plugin + branch: master tempest_test_whitelist: - - neutron.tests.tempest.api.test_networks* + - "neutron_tempest_plugin.api.test_networks*" tempest_private_net_provider_type: "local" tempest_private_net_seg_id: '' diff --git a/tests/neutron-overrides-dragonflow.yml b/tests/neutron-overrides-dragonflow.yml index bc1a90f7..995d5ddb 100644 --- a/tests/neutron-overrides-dragonflow.yml +++ b/tests/neutron-overrides-dragonflow.yml @@ -29,9 +29,12 @@ tempest_plugins: - name: dragonflow repo: https://git.openstack.org/openstack/dragonflow branch: master + - name: neutron-plugins + repo: https://git.openstack.org/openstack/neutron-tempest-plugin + branch: master tempest_test_whitelist: - - neutron.tests.tempest.api.test_networks* + - "neutron_tempest_plugin.api.test_networks*" dragonflow_fullstack_failing_tests: - dragonflow.tests.fullstack.test_db_consistent.TestDbConsistent.test_db_consistent diff --git a/tests/neutron-overrides-opendaylight.yml b/tests/neutron-overrides-opendaylight.yml index 1774d040..7b8b8a39 100644 --- a/tests/neutron-overrides-opendaylight.yml +++ b/tests/neutron-overrides-opendaylight.yml @@ -35,6 +35,9 @@ tempest_plugins: - name: neutron repo: https://git.openstack.org/openstack/neutron branch: master + - name: neutron-plugins + repo: https://git.openstack.org/openstack/neutron-tempest-plugin + branch: master tempest_test_whitelist: - - neutron.tests.tempest.api.test_networks* + - "neutron_tempest_plugin.api.test_networks*" diff --git a/tests/neutron-overrides-ovs-nsh.yml b/tests/neutron-overrides-ovs-nsh.yml index af19c35b..3f76f742 100644 --- a/tests/neutron-overrides-ovs-nsh.yml +++ b/tests/neutron-overrides-ovs-nsh.yml @@ -31,6 +31,9 @@ tempest_plugins: - name: neutron repo: https://git.openstack.org/openstack/neutron branch: master + - name: neutron-plugins + repo: https://git.openstack.org/openstack/neutron-tempest-plugin + branch: master tempest_test_whitelist: - - neutron.tests.tempest.api.test_networks* + - "neutron_tempest_plugin.api.test_networks*" diff --git a/tests/neutron-overrides-ovs.yml b/tests/neutron-overrides-ovs.yml index 304e0d9b..e5d2d270 100644 --- a/tests/neutron-overrides-ovs.yml +++ b/tests/neutron-overrides-ovs.yml @@ -10,9 +10,12 @@ tempest_plugins: - name: neutron repo: https://git.openstack.org/openstack/neutron branch: master + - name: neutron-plugins + repo: https://git.openstack.org/openstack/neutron-tempest-plugin + branch: master tempest_test_whitelist: - - neutron.tests.tempest.api.test_networks* + - "neutron_tempest_plugin.api.test_networks*" neutron_plugin_type: ml2.ovs neutron_local_ip: "{{ ansible_host }}" diff --git a/tests/os_neutron-overrides.yml b/tests/os_neutron-overrides.yml index 4690645e..be1d7dd6 100644 --- a/tests/os_neutron-overrides.yml +++ b/tests/os_neutron-overrides.yml @@ -19,9 +19,12 @@ tempest_plugins: - name: neutron repo: https://git.openstack.org/openstack/neutron branch: master + - name: neutron-plugins + repo: https://git.openstack.org/openstack/neutron-tempest-plugin + branch: master tempest_test_whitelist: - - neutron.tests.tempest.api.test_networks* + - "neutron_tempest_plugin.api.test_networks*" haproxy_ssl: false external_lb_vip_address: 10.1.0.1 diff --git a/tests/test-calico-functional.yml b/tests/test-calico-functional.yml index cb8f94a8..1087c58d 100644 --- a/tests/test-calico-functional.yml +++ b/tests/test-calico-functional.yml @@ -25,6 +25,8 @@ - calico-dhcp-age tags: - skip_ansible_lint + when: + - "neutron_plugin_type == 'ml2.calico'" - name: Ensure that the Calico Felix agent is alive command: openstack --os-cloud default network agent list -f json @@ -41,6 +43,8 @@ run_once: yes tags: - skip_ansible_lint + when: + - "neutron_plugin_type == 'ml2.calico'" vars_files: - common/test-vars.yml diff --git a/tests/test-dragonflow-functional.yml b/tests/test-dragonflow-functional.yml index be2f6ca4..d39d0c46 100644 --- a/tests/test-dragonflow-functional.yml +++ b/tests/test-dragonflow-functional.yml @@ -17,8 +17,6 @@ hosts: physical_host user: root gather_facts: true - roles: - - role: "{{ tempest_rolename | default('os_tempest') }}" post_tasks: - name: Run Dragonflow fullstack tests shell: | @@ -33,11 +31,15 @@ register: dragonflow_fullstack_tests tags: - skip_ansible_lint + when: + - "neutron_plugin_type == 'ml2.dragonflow'" - name: Ensure etc folder exists in logs file: path: /var/log/etc state: directory + when: + - "neutron_plugin_type == 'ml2.dragonflow'" - name: Copy config files shell: | @@ -45,6 +47,8 @@ register: dragonflow_fullstack_log_copy tags: - skip_ansible_lint + when: + - "neutron_plugin_type == 'ml2.dragonflow'" - name: Verify tests have passed shell: | @@ -53,6 +57,8 @@ exit $? tags: - skip_ansible_lint + when: + - "neutron_plugin_type == 'ml2.dragonflow'" vars_files: - common/test-vars.yml diff --git a/tests/test.yml b/tests/test.yml index 1b1220bf..fd3b28bb 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -35,9 +35,5 @@ - include: common/test-install-tempest.yml - include: test-calico-functional.yml - when: - - "neutron_plugin_type == 'ml2.calico'" - include: test-dragonflow-functional.yml - when: - - "neutron_plugin_type == 'ml2.dragonflow'"