diff --git a/.gitignore b/.gitignore index 53a7668e..b57b99d2 100644 --- a/.gitignore +++ b/.gitignore @@ -61,9 +61,8 @@ ChangeLog releasenotes/build # Test temp files -tests/plugins -tests/playbooks -tests/test.retry +tests/common +tests/*.retry # Vagrant artifacts .vagrant diff --git a/tests/neutron-overrides-calico.yml b/tests/neutron-overrides-calico.yml index af2429aa..cbb9209e 100644 --- a/tests/neutron-overrides-calico.yml +++ b/tests/neutron-overrides-calico.yml @@ -13,6 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +tempest_run: yes + +tempest_plugins: + - name: neutron + repo: https://git.openstack.org/openstack/neutron + branch: master + +tempest_test_whitelist: + - neutron.tests.tempest.api.test_networks* + neutron_plugin_type: ml2.calico neutron_provider_networks: network_types: '' diff --git a/tests/neutron-overrides-ovs.yml b/tests/neutron-overrides-ovs.yml index e71ec45f..bc0180f4 100644 --- a/tests/neutron-overrides-ovs.yml +++ b/tests/neutron-overrides-ovs.yml @@ -4,5 +4,15 @@ openstack_host_specific_kernel_modules: pattern: "CONFIG_OPENVSWITCH=" group: "physical_host" +tempest_run: yes + +tempest_plugins: + - name: neutron + repo: https://git.openstack.org/openstack/neutron + branch: master + +tempest_test_whitelist: + - neutron.tests.tempest.api.test_networks* + neutron_plugin_type: ml2.ovs neutron_local_ip: "{{ ansible_host }}" diff --git a/tests/test-calico-functional.yml b/tests/test-calico-functional.yml index b5b927b7..c496993a 100644 --- a/tests/test-calico-functional.yml +++ b/tests/test-calico-functional.yml @@ -13,19 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Ensure Calico services are running - command: pgrep -a {{ item }} - with_items: - - calico-felix - - calico-dhcp-age - -- name: Ensure that the Calico Felix agent is alive - shell: | - . /root/openrc - neutron agent-list | grep calico-felix - register: calico_felix_agent - until: calico_felix_agent.stdout.find(':-)') != -1 - when: - - groups['neutron_calico_dhcp_agent'] | length > 0 - retries: 5 - delay: 10 +- name: Test calico + hosts: neutron_all + user: root + gather_facts: true + tasks: + - name: Ensure Calico services are running + command: pgrep -a {{ item }} + with_items: + - calico-felix + - calico-dhcp-age + - name: Ensure that the Calico Felix agent is alive + shell: | + . /root/openrc + neutron agent-list | grep calico-felix + register: calico_felix_agent + until: calico_felix_agent.stdout.find(':-)') != -1 + when: + - groups['neutron_calico_dhcp_agent'] | length > 0 + retries: 5 + delay: 10 + vars_files: + - common/test-vars.yml diff --git a/tests/test-neutron-functional.yml b/tests/test-neutron-functional.yml deleted file mode 100644 index e237d796..00000000 --- a/tests/test-neutron-functional.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Packages need to be installed outside -# of venv to be usable by Ansible - -- name: Test neutron - hosts: neutron_all - user: root - gather_facts: true - tasks: - - name: Run tempest - shell: | - . {{ tempest_venv_bin }}/activate - {{ tempest_venv_bin | dirname }}/run_tempest.sh --no-virtual-env --serial tempest.api.network - register: run_tempest - until: run_tempest|success - retries: 3 - delay: 5 - - post_tasks: - - include: test-calico-functional.yml - when: - - "{{ neutron_plugin_type == 'ml2.calico' }}" - vars_files: - - common/test-vars.yml diff --git a/tests/test.yml b/tests/test.yml index d52aafeb..57a117b6 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -30,8 +30,9 @@ # Install Neutron - include: common/test-install-neutron.yml -# Install Tempest +# Install and execute tempest - include: common/test-install-tempest.yml -# Run tests -- include: test-neutron-functional.yml +- include: test-calico-functional.yml + when: + - "{{ neutron_plugin_type == 'ml2.calico' }}"