openstack-ansible-os_zun/tests/test-zun-check.yml
Jean-Philippe Evrard 6ce64bb2eb Add zuul jobs
Add functional and linting tests for the new project.

Change-Id: Iae103901131aef872ba7daae078813ae81b1d0d2
2018-06-28 17:03:22 +00:00

51 lines
1.7 KiB
YAML

---
# Copyright 2018, 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: Create a zun image
hosts: zun_compute
become: true
tasks:
- name: Pull cirros image
command: docker pull cirros
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint
- name: Upload image into glance
shell: |
. /root/openrc
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint
- name: Run zun service check
hosts: zun_api[0]
become: true
tasks:
- name: Check zun service is functional
shell: |
. /root/openrc
/openstack/venvs/zun-untagged/bin/openstack appcontainer service list
changed_when: false
- name: Create zun container
shell: |
. /root/openrc
/openstack/venvs/zun-untagged/bin/openstack appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint