Using updated tempest method for trove api.
Change-Id: I3e8498db924ef095078e56bbedb8fbd587f4986c
This commit is contained in:
parent
88aa21d43a
commit
b9babfe3f4
7
.gitignore
vendored
7
.gitignore
vendored
@ -61,11 +61,8 @@ ChangeLog
|
|||||||
releasenotes/build
|
releasenotes/build
|
||||||
|
|
||||||
# Test temp files
|
# Test temp files
|
||||||
tests/plugins
|
tests/common
|
||||||
tests/playbooks
|
tests/*.retry
|
||||||
tests/test.retry
|
|
||||||
|
|
||||||
# Vagrant artifacts
|
# Vagrant artifacts
|
||||||
.vagrant
|
.vagrant
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ trove_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/trove.tgz
|
|||||||
|
|
||||||
trove_git_repo: "https://git.openstack.org/openstack/trove"
|
trove_git_repo: "https://git.openstack.org/openstack/trove"
|
||||||
trove_git_install_branch: master
|
trove_git_install_branch: master
|
||||||
|
|
||||||
trove_developer_mode: false
|
trove_developer_mode: false
|
||||||
trove_developer_constraints:
|
trove_developer_constraints:
|
||||||
- "git+{{ trove_git_repo }}@{{ trove_git_install_branch }}#egg=trove"
|
- "git+{{ trove_git_repo }}@{{ trove_git_install_branch }}#egg=trove"
|
||||||
@ -133,8 +134,6 @@ trove_requires_pip_packages:
|
|||||||
- httplib2
|
- httplib2
|
||||||
- python-glanceclient
|
- python-glanceclient
|
||||||
- python-keystoneclient
|
- python-keystoneclient
|
||||||
- python-memcached
|
|
||||||
- python-troveclient
|
|
||||||
- virtualenv
|
- virtualenv
|
||||||
- virtualenv-tools
|
- virtualenv-tools
|
||||||
|
|
||||||
@ -144,6 +143,8 @@ trove_pip_packages:
|
|||||||
- pexpect
|
- pexpect
|
||||||
- pycrypto
|
- pycrypto
|
||||||
- trove
|
- trove
|
||||||
|
- python-troveclient
|
||||||
|
- python-memcached
|
||||||
|
|
||||||
# This variable is used by the repo_build process to determine
|
# This variable is used by the repo_build process to determine
|
||||||
# which host group to check for members of before building the
|
# which host group to check for members of before building the
|
||||||
|
@ -46,3 +46,7 @@
|
|||||||
src: https://git.openstack.org/openstack/openstack-ansible-os_keystone
|
src: https://git.openstack.org/openstack/openstack-ansible-os_keystone
|
||||||
scm: git
|
scm: git
|
||||||
version: master
|
version: master
|
||||||
|
- name: os_tempest
|
||||||
|
src: https://git.openstack.org/openstack/openstack-ansible-os_tempest
|
||||||
|
scm: git
|
||||||
|
version: master
|
||||||
|
@ -16,6 +16,9 @@ infra1
|
|||||||
[memcached_all]
|
[memcached_all]
|
||||||
infra1
|
infra1
|
||||||
|
|
||||||
|
[utility_all]
|
||||||
|
openstack1
|
||||||
|
|
||||||
[service_all:children]
|
[service_all:children]
|
||||||
rabbitmq_all
|
rabbitmq_all
|
||||||
galera_all
|
galera_all
|
||||||
|
@ -37,9 +37,19 @@ trove_service_region: RegionOne
|
|||||||
trove_service_user_domain_id: default
|
trove_service_user_domain_id: default
|
||||||
trove_service_user_name: trove
|
trove_service_user_name: trove
|
||||||
trove_service_port: 8779
|
trove_service_port: 8779
|
||||||
trove_venv_tag: untagged
|
trove_venv_tag: "untagged"
|
||||||
trove_bin: "/openstack/venvs/trove-{{ trove_venv_tag }}/bin"
|
trove_bin: "/openstack/venvs/trove-{{ trove_venv_tag }}/bin"
|
||||||
neutron_service_port: 9696
|
neutron_service_port: 9696
|
||||||
swift_proxy_port: 8080
|
swift_proxy_port: 8080
|
||||||
cinder_service_port: 8776
|
cinder_service_port: 8776
|
||||||
nova_service_port: 8774
|
nova_service_port: 8774
|
||||||
|
|
||||||
|
tempest_run: yes
|
||||||
|
|
||||||
|
tempest_plugins:
|
||||||
|
- name: trove
|
||||||
|
repo: https://git.openstack.org/openstack/trove
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
tempest_test_whitelist:
|
||||||
|
- trove.tests.tempest.tests.api.database.versions.*
|
@ -21,62 +21,14 @@
|
|||||||
user: root
|
user: root
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# NOTE: These are typically installed in the repo server where we build the
|
- include: common/create-grant-db.yml
|
||||||
# trove wheel
|
db_name: "{{ trove_galera_database_name }}"
|
||||||
- name: Install packages required to build trove python package
|
db_password: "{{ trove_galera_password }}"
|
||||||
apt:
|
- include: common/ensure-rabbitmq.yml
|
||||||
name: "{{ item }}"
|
vhost_name: "{{ trove_rabbitmq_vhost }}"
|
||||||
with_items:
|
user_name: "{{ trove_rabbitmq_userid }}"
|
||||||
- libxml2-dev
|
user_password: "{{ trove_rabbitmq_password }}"
|
||||||
- libxslt-dev
|
|
||||||
- libffi-dev
|
|
||||||
- pkg-config
|
|
||||||
- libvirt-dev
|
|
||||||
when: inventory_hostname in groups['trove_all']
|
|
||||||
- name: Ensure rabbitmq vhost
|
|
||||||
rabbitmq_vhost:
|
|
||||||
name: "{{ trove_rabbitmq_vhost }}"
|
|
||||||
state: "present"
|
|
||||||
delegate_to: "{{ hostvars[groups['rabbitmq_all'][0]]['ansible_host'] }}"
|
|
||||||
when: inventory_hostname == groups['trove_all'][0]
|
|
||||||
- name: Ensure rabbitmq user
|
|
||||||
rabbitmq_user:
|
|
||||||
user: "{{ trove_rabbitmq_userid }}"
|
|
||||||
password: "{{ trove_rabbitmq_password }}"
|
|
||||||
vhost: "{{ trove_rabbitmq_vhost }}"
|
|
||||||
configure_priv: ".*"
|
|
||||||
read_priv: ".*"
|
|
||||||
write_priv: ".*"
|
|
||||||
state: "present"
|
|
||||||
delegate_to: "{{ hostvars[groups['rabbitmq_all'][0]]['ansible_host'] }}"
|
|
||||||
when: inventory_hostname == groups['trove_all'][0]
|
|
||||||
- name: Create DB for service
|
|
||||||
mysql_db:
|
|
||||||
login_user: "{{ galera_root_user }}"
|
|
||||||
login_password: "{{ galera_root_password }}"
|
|
||||||
login_host: "{{ trove_galera_address }}"
|
|
||||||
name: "{{ trove_galera_database_name }}"
|
|
||||||
state: "present"
|
|
||||||
delegate_to: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
|
||||||
when: inventory_hostname == groups['trove_all'][0]
|
|
||||||
- name: Grant access to the DB for the service
|
|
||||||
mysql_user:
|
|
||||||
login_user: "{{ galera_root_user }}"
|
|
||||||
login_password: "{{ galera_root_password }}"
|
|
||||||
login_host: "{{ trove_galera_address }}"
|
|
||||||
name: "{{ trove_galera_database_name }}"
|
|
||||||
password: "{{ trove_galera_password }}"
|
|
||||||
host: "{{ item }}"
|
|
||||||
state: "present"
|
|
||||||
priv: "{{ trove_galera_database_name }}.*:ALL"
|
|
||||||
with_items:
|
|
||||||
- "localhost"
|
|
||||||
- "%"
|
|
||||||
delegate_to: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
|
||||||
when: inventory_hostname == groups['trove_all'][0]
|
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: "os_trove"
|
- role: "os_trove"
|
||||||
vars_files:
|
vars_files:
|
||||||
- common/test-vars.yml
|
- common/test-vars.yml
|
||||||
- test-vars.yml
|
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
# Copyright 2016 Internet Solutions (Pty) Ltd
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
|
||||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
|
||||||
# Reference: http://developer.openstack.org/api-ref-database-v1.html
|
|
||||||
|
|
||||||
- name: Playbook for functional testing of trove
|
|
||||||
hosts: trove_all
|
|
||||||
user: root
|
|
||||||
gather_facts: false
|
|
||||||
vars:
|
|
||||||
trove_api: "http://localhost:{{ trove_service_port }}"
|
|
||||||
tasks:
|
|
||||||
- name: Install openstackclient
|
|
||||||
pip:
|
|
||||||
name: "python-openstackclient"
|
|
||||||
|
|
||||||
- name: Check the trove-api
|
|
||||||
uri:
|
|
||||||
url: "{{ trove_api }}"
|
|
||||||
status_code: 200,300
|
|
||||||
|
|
||||||
- name: Validate that auth is required
|
|
||||||
uri:
|
|
||||||
url: "{{ trove_api }}/v1.0/status"
|
|
||||||
status_code: 401
|
|
||||||
|
|
||||||
- name: Get auth token
|
|
||||||
shell: >
|
|
||||||
. /root/openrc && openstack token issue --format yaml | awk '/^id\:/ {print $2}'
|
|
||||||
register: get_keystone_token
|
|
||||||
|
|
||||||
- name: set token
|
|
||||||
set_fact:
|
|
||||||
keystone_token: "{{ get_keystone_token.stdout }}"
|
|
||||||
|
|
||||||
vars_files:
|
|
||||||
- test-vars.yml
|
|
@ -28,5 +28,5 @@
|
|||||||
# Install trove
|
# Install trove
|
||||||
- include: test-install-trove.yml
|
- include: test-install-trove.yml
|
||||||
|
|
||||||
# Test trove
|
# Install and execute Tempest
|
||||||
- include: test-trove-functional.yml
|
- include: common/test-install-tempest.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user