Using updated tempest method for horizon.

Change-Id: Id6798a982052fe299545a402820d8cff7618b25c
This commit is contained in:
Donovan Francesco (drifterza) 2016-11-17 12:44:31 +02:00
parent 596f76901b
commit 111c03cc92
5 changed files with 45 additions and 85 deletions

6
.gitignore vendored
View File

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

View File

@ -43,18 +43,18 @@ nova_service_adminurl: "{{ nova_service_adminuri }}/v2.1/%(tenant_id)s"
nova_service_internaluri: "{{ nova_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_service_port }}"
nova_service_internalurl: "{{ nova_service_internaluri }}/v2.1/%(tenant_id)s"
tempest_run: yes
tempest_dashboard_login_url: "https://{{ hostvars[groups['horizon_all'][0]]['ansible_host'] }}/auth/login/"
tempest_dashboard_url: "https://{{ hostvars[groups['horizon_all'][0]]['ansible_host'] }}/"
tempest_venv_tag: "{{ tempest_git_install_branch }}"
# tempest_bin is the same as the default in os_tempest role, but we set
# it again here so we can refer to it in test-horizon-functional.yml
tempest_bin: "/opt/tempest_{{ tempest_venv_tag }}/bin"
tempest_plugins:
- name: tempest-horizon
repo: https://github.com/openstack/tempest-horizon
branch: master
tempest_test_whitelist:
- tempest_horizon.tests.scenario.test_dashboard_basic_ops.TestDashboardBasicOps
tempest_tempest_conf_overrides:
dashboard:
disable_ssl_certificate_validation: True

View File

@ -1,73 +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.
- name: Playbook for functional testing of horizon
hosts: horizon_all
user: root
gather_facts: false
tasks:
# Horizon tempest testing require the compute service
# and endpoints to be registered within the region
- name: Ensure nova service
keystone:
command: "ensure_service"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
service_name: "{{ nova_service_name }}"
service_type: "{{ nova_service_type }}"
description: "{{ nova_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
until: add_service|success
retries: 5
delay: 2
- name: Ensure nova endpoint
keystone:
command: "ensure_endpoint"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
region_name: "{{ nova_service_region }}"
service_name: "{{ nova_service_name }}"
service_type: "{{ nova_service_type }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
endpoint_list:
- url: "{{ nova_service_publicurl }}"
interface: "public"
- url: "{{ nova_service_internalurl }}"
interface: "internal"
- url: "{{ nova_service_adminurl }}"
interface: "admin"
register: add_service
until: add_service|success
retries: 5
delay: 10
vars_files:
- common/test-vars.yml
- name: Playbook for tempest testing of horizon
hosts: utility_all
user: root
gather_facts: false
tasks:
- name: Run tempest
shell: |
. {{ tempest_bin }}/activate
{{ tempest_bin | dirname }}/run_tempest.sh --no-virtual-env --serial tempest_horizon.tests.scenario.test_dashboard_basic_ops.TestDashboardBasicOps
vars_files:
- common/test-vars.yml

View File

@ -21,6 +21,44 @@
- include: common/create-grant-db.yml
db_name: "{{ horizon_galera_database }}"
db_password: "{{ horizon_container_mysql_password }}"
post_tasks:
- name: Ensure nova service
keystone:
command: "ensure_service"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
service_name: "{{ nova_service_name }}"
service_type: "{{ nova_service_type }}"
description: "{{ nova_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
until: add_service|success
retries: 5
delay: 2
- name: Ensure nova endpoint
keystone:
command: "ensure_endpoint"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
region_name: "{{ nova_service_region }}"
service_name: "{{ nova_service_name }}"
service_type: "{{ nova_service_type }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
endpoint_list:
- url: "{{ nova_service_publicurl }}"
interface: "public"
- url: "{{ nova_service_internalurl }}"
interface: "internal"
- url: "{{ nova_service_adminurl }}"
interface: "admin"
register: add_service
until: add_service|success
retries: 5
delay: 10
roles:
- role: "{{ horizon_rolename | default('os_horizon') }}"
vars_files:

View File

@ -25,8 +25,5 @@
# Install Horizon
- include: test-install-horizon.yml
# Install Tempest
# Install and execute Tempest
- include: common/test-install-tempest.yml
# Test Horizon
- include: test-horizon-functional.yml