From 111c03cc9232444b87c22dc3c8ddaa840113c624 Mon Sep 17 00:00:00 2001 From: "Donovan Francesco (drifterza)" Date: Thu, 17 Nov 2016 12:44:31 +0200 Subject: [PATCH] Using updated tempest method for horizon. Change-Id: Id6798a982052fe299545a402820d8cff7618b25c --- .gitignore | 6 +-- tests/os_horizon-overrides.yml | 8 ++-- tests/test-horizon-functional.yml | 73 ------------------------------- tests/test-install-horizon.yml | 38 ++++++++++++++++ tests/test.yml | 5 +-- 5 files changed, 45 insertions(+), 85 deletions(-) delete mode 100644 tests/test-horizon-functional.yml diff --git a/.gitignore b/.gitignore index 21adf3c5..6079b40f 100644 --- a/.gitignore +++ b/.gitignore @@ -62,10 +62,8 @@ releasenotes/build # Test temp files tests/plugins -tests/playbooks -tests/test.retry +tests/common +tests/*.retry # Vagrant artifacts .vagrant - - diff --git a/tests/os_horizon-overrides.yml b/tests/os_horizon-overrides.yml index ba939e9b..e4939fdf 100644 --- a/tests/os_horizon-overrides.yml +++ b/tests/os_horizon-overrides.yml @@ -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 diff --git a/tests/test-horizon-functional.yml b/tests/test-horizon-functional.yml deleted file mode 100644 index 77e21dd9..00000000 --- a/tests/test-horizon-functional.yml +++ /dev/null @@ -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 diff --git a/tests/test-install-horizon.yml b/tests/test-install-horizon.yml index ba240b24..6e27f25d 100644 --- a/tests/test-install-horizon.yml +++ b/tests/test-install-horizon.yml @@ -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: diff --git a/tests/test.yml b/tests/test.yml index f4a648ac..90916080 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -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