Using updated tempest method for neutron.

Change-Id: Ic6966699b9af4f75cb639c504cb64167d4fa8fb9
This commit is contained in:
Donovan Francesco (drifterza) 2016-11-17 13:00:36 +02:00
parent 08e84191e0
commit 40b8d4ac7d
6 changed files with 48 additions and 60 deletions

5
.gitignore vendored
View File

@ -61,9 +61,8 @@ ChangeLog
releasenotes/build
# Test temp files
tests/plugins
tests/playbooks
tests/test.retry
tests/common
tests/*.retry
# Vagrant artifacts
.vagrant

View File

@ -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: ''

View File

@ -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 }}"

View File

@ -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

View File

@ -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

View File

@ -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' }}"