Add tempest tests to test-repository

For now we'll setup the keystone tests only, but in future we may extend
this to match the projects that are tested in this repository.

To make this more generic:
* Use a conditional on the  "tempest_service_available_*" variables,
based on the precense of the specific service.
* Change the tempest_main_group to "utility_all"
* Remove the second keystone container, this is redundant for the
central testing repository

Change-Id: Icb10524004c7b93889d45f9f54773782fb84b36e
This commit is contained in:
Andy McCrae 2016-09-06 17:02:53 +01:00 committed by Andy McCrae
parent d894af2ed7
commit 0a7e26df8b
5 changed files with 56 additions and 13 deletions

View File

@ -209,16 +209,16 @@ tempest_venv_tag: "{{ tempest_git_install_branch }}"
# it again here so we can refer to it in test-nova-functional.yml
tempest_venv_bin: "/opt/tempest_{{ tempest_venv_tag }}/bin"
tempest_log_dir: "/var/log/"
tempest_main_group: glance_all
tempest_service_available_aodh: False
tempest_service_available_ceilometer: False
tempest_service_available_cinder: False
tempest_service_available_glance: True
tempest_service_available_heat: False
tempest_service_available_horizon: False
tempest_service_available_neutron: True
tempest_service_available_nova: True
tempest_service_available_swift: False
tempest_main_group: utility_all
tempest_service_available_aodh: "{{ ((groups['aodh_all'] is defined) and (groups['aodh_all'] | length > 0)) }}"
tempest_service_available_ceilometer: "{{ ((groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0)) }}"
tempest_service_available_cinder: "{{ ((groups['cinder_all'] is defined) and (groups['cinder_all'] | length > 0)) }}"
tempest_service_available_glance: "{{ ((groups['glance_all'] is defined) and (groups['glance_all'] | length > 0)) }}"
tempest_service_available_heat: "{{ ((groups['heat_all'] is defined) and (groups['heat_all'] | length > 0)) }}"
tempest_service_available_horizon: "{{ ((groups['horizon_all'] is defined) and (groups['horizon_all'] | length > 0)) }}"
tempest_service_available_neutron: "{{ ((groups['neutron_all'] is defined) and (groups['neutron_all'] | length > 0)) }}"
tempest_service_available_nova: "{{ ((groups['nova_all'] is defined) and (groups['nova_all'] | length > 0)) }}"
tempest_service_available_swift: "{{ ((groups['swift_all'] is defined) and (groups['swift_all'] | length > 0)) }}"
# openrc settings
openrc_os_password: "{{ keystone_auth_admin_password }}"

View File

@ -34,3 +34,11 @@
src: https://git.openstack.org/openstack/openstack-ansible-os_keystone
scm: git
version: master
- name: openstack_openrc
src: https://git.openstack.org/openstack/openstack-ansible-openstack_openrc
scm: git
version: master
- name: os_tempest
src: https://git.openstack.org/openstack/openstack-ansible-os_tempest
scm: git
version: master

View File

@ -2,12 +2,10 @@
localhost ansible_connection=local ansible_become=True
infra1 ansible_ssh_host=10.1.0.2 ansible_host=10.1.0.2 ansible_become=True ansible_user=root
keystone1 ansible_ssh_host=10.1.0.3 ansible_host=10.1.0.3 ansible_become=True ansible_user=root
keystone2 ansible_ssh_host=10.1.0.4 ansible_host=10.1.0.4 ansible_become=True ansible_user=root
[all_containers]
infra1
keystone1
keystone2
[rabbitmq_all]
infra1
@ -25,6 +23,6 @@ memcached_all
[keystone_all]
keystone1
keystone2
[utility_all]
keystone1

View File

@ -0,0 +1,30 @@
---
# 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.
# Run tempest identity tests on one keystone host.
- name: Playbook for functional testing keystone
hosts: utility_all[0]
user: root
gather_facts: false
tasks:
# TODO(andymccr): add credentials functionality to keystone and remove the "credentials" exclusion.
- name: Run tempest
shell: |
. {{ tempest_venv_bin }}/activate
{{ tempest_venv_bin | dirname }}/run_tempest.sh --no-virtual-env ${RUN_TEMPEST_OPTS} '^tempest.api.identity*'
environment:
RUN_TEMPEST_OPTS: "--serial"
vars_files:
- playbooks/test-vars.yml

View File

@ -27,3 +27,10 @@
# Install Keystone
- include: playbooks/test-install-keystone.yml
# Install Tempest
- include: playbooks/test-install-tempest.yml
# Test test repository
# TODO(andymccr): Add additional tests for now start with just keystone
- include: test-tests-functional.yml