Adding simple functional testing for the role
Previously only role convergence was tested. This patch paves the way to have functional testing support the addition of Xenial support as well as adding more thorough functional testing using the Tempest plugin available in the zaqar source. Change-Id: I593fe5e61df2daca0857548394e04aa2afa35499
This commit is contained in:
parent
6dedbe271c
commit
35cde17905
@ -39,6 +39,8 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ zaqar_apt_packages }}"
|
||||
when:
|
||||
- item != ''
|
||||
tags:
|
||||
- zaqar-apt-packages
|
||||
|
||||
|
@ -25,12 +25,15 @@
|
||||
tags:
|
||||
- zaqar-httpd
|
||||
|
||||
- name: Add zaqar apache configuration file
|
||||
- name: Add zaqar apache configuration files
|
||||
template:
|
||||
src: "zaqar-httpd.conf.j2"
|
||||
dest: "/etc/apache2/sites-available/zaqar-httpd.conf"
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
with_items:
|
||||
- { src: "zaqar_apache_ports.conf.j2", dest: "/etc/apache2/ports.conf" }
|
||||
- { src: "zaqar-httpd.conf.j2", dest: "/etc/apache2/sites-available/zaqar-httpd.conf" }
|
||||
notify:
|
||||
- Restart Apache
|
||||
tags:
|
||||
|
@ -1,7 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
Listen {{ zaqar_api_bind_port }}
|
||||
|
||||
<VirtualHost *:{{ zaqar_api_bind_port }}>
|
||||
WSGIDaemonProcess zaqar-api user={{ zaqar_system_user_name }} group={{ zaqar_system_group_name }} processes={{ zaqar_wsgi_processes }} threads={{ zaqar_wsgi_threads }} display-name=%{GROUP}
|
||||
WSGIProcessGroup zaqar-api
|
||||
|
3
templates/zaqar_apache_ports.conf.j2
Normal file
3
templates/zaqar_apache_ports.conf.j2
Normal file
@ -0,0 +1,3 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
Listen {{ zaqar_api_bind_port }}
|
@ -19,7 +19,7 @@
|
||||
roles:
|
||||
- role: "{{ rolename | basename }}"
|
||||
zaqar_developer_mode: true
|
||||
zaqar_install_nginx: true
|
||||
zaqar_install_apache: true
|
||||
zaqar_mgmt_db_connection_string: 'sqlite:////tmp/zaqar.db'
|
||||
external_lb_vip_address: 10.100.100.2
|
||||
internal_lb_vip_address: 10.100.100.2
|
||||
|
27
tests/test-zaqar-functional.yml
Normal file
27
tests/test-zaqar-functional.yml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
# 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 zaqar
|
||||
hosts: zaqar_all
|
||||
user: root
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Install testing pip packages
|
||||
pip:
|
||||
name: "httplib2"
|
||||
- name: Check the zaqar-api
|
||||
uri:
|
||||
url: "http://localhost:8888"
|
||||
status_code: 401
|
@ -29,4 +29,7 @@
|
||||
- include: test-install-keystone.yml
|
||||
|
||||
# Install Zaqar
|
||||
- include: test-install-zaqar.yml
|
||||
- include: test-install-zaqar.yml
|
||||
|
||||
# Test Zaqar
|
||||
- include: test-zaqar-functional.yml
|
@ -23,6 +23,6 @@ zaqar_apt_packages:
|
||||
- python2.7-dev
|
||||
- python-dev
|
||||
- zlib1g-dev
|
||||
- apache2
|
||||
- nginx
|
||||
- libapache2-mod-wsgi
|
||||
- "{% if zaqar_install_apache %}apache2{% endif %}"
|
||||
- "{% if zaqar_install_apache %}libapache2-mod-wsgi{% endif %}"
|
||||
- "{% if zaqar_install_nginx %}nginx{% endif %}"
|
||||
|
Loading…
Reference in New Issue
Block a user