Use tempest plugin for functional testing

Use barbican's tempest plugin for functional testing instead.

Change-Id: Ic17fd4c7c4d229ea33d1d8859e9b8b453984e7dc
Depends-On: I7987c5a4dbf50e97322a5b348c3cbd817b2672d6
This commit is contained in:
Jimmy McCrory 2017-11-08 11:48:57 -08:00
parent e941396601
commit 1fe60daf28
5 changed files with 36 additions and 71 deletions

View File

@ -42,4 +42,7 @@
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
scm: git
version: master
- name: os_tempest
src: https://git.openstack.org/openstack/openstack-ansible-os_tempest
scm: git
version: master

View File

@ -31,3 +31,6 @@ barbican1
[barbican_all:children]
barbican_api
[utility_all]
infra1

View File

@ -0,0 +1,27 @@
---
# Copyright 2017, 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.
tempest_run: yes
tempest_plugins:
- name: barbican-tempest-plugin
repo: https://git.openstack.org/openstack/barbican-tempest-plugin
branch: master
tempest_test_whitelist:
- barbican_tempest_plugin.tests.api
tempest_roles:
- key-manager:service-admin

View File

@ -1,68 +0,0 @@
---
# Copyright 2016, 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 barbican
hosts: barbican_api
user: root
roles:
- openstack_openrc
post_tasks:
# Packages need to be installed outside
# of venv to be usable by Ansible
- name: Install testing pip packages
pip:
name: "{{ item }}"
state: present
extra_args: >-
{{ barbican_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ pip_install_options | default('') }}
with_items:
- httplib2
- python-barbicanclient
- python-openstackclient
- name: Check the barbican api
uri:
url: "http://localhost:9311"
status_code: 200,300
- name: Create a test secret
shell: |
. /root/openrc
openstack secret store --payload secrete --payload-content-type text/plain
register: barbican_secret_store
tags:
- skip_ansible_lint
- name: Register secret location
set_fact:
secret_ref: "{{ item.split('|')[2] }}"
with_items: "{{ barbican_secret_store.stdout_lines }}"
when: item.find('Secret href') != -1
- name: Retrieve test secret
shell: |
. /root/openrc
openstack secret get --decrypt --payload_content_type text/plain {{ secret_ref }}
register: barbican_secret_store
tags:
- skip_ansible_lint
- name: Check retrieved secret
assert:
that: barbican_secret_store.stdout.find('secrete') != -1
vars_files:
- common/test-vars.yml
- test-vars.yml

View File

@ -28,5 +28,5 @@
# Install Barbican
- include: test-install-barbican.yml
# Test Barbican
- include: test-barbican-functional.yml
# Install Tempest
- include: common/test-install-tempest.yml