metadata:
description: Verify that image-serve service is ready
groups:
- pre-upgrade
- post-deployment
- post-upgrade
name: Image-serve availability
driver:
name: podman
log: true
platforms:
- command: /sbin/init
dockerfile: Dockerfile
environment:
http_proxy: '{{ lookup(''env'', ''http_proxy'') }}'
https_proxy: '{{ lookup(''env'', ''https_proxy'') }}'
etc_hosts:
undercloud.ctlplane.mydomain.tld: 127.0.0.1
hostname: ubi8
image: ubi8/ubi-init
name: ubi8
override_command: true
pkg_extras: python*-setuptools
privileged: true
registry:
url: registry.access.redhat.com
ulimits:
- host
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
- /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
- /opt/yum.repos.d:/etc/yum.repos.d:rw
provisioner:
env:
ANSIBLE_LIBRARY: ${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}
ANSIBLE_ROLES_PATH: ${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles
ANSIBLE_STDOUT_CALLBACK: yaml
inventory:
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
log: true
name: ansible
scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- verify
- destroy
verifier:
name: testinfra
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
- gather_facts: false
hosts: all
name: Converge
tasks:
- block:
- include_role:
name: image_serve
name: run validation for wrong port
vars:
container_registry_port: 9999
name: detect wrong port
rescue:
- meta: clear_host_errors
name: Clear host errors
- debug:
msg: Detected faulty port!
name: Status message
- block:
- include_role:
name: image_serve
name: Run validation for wrong config file
vars:
container_registry_httpd_config: /fake-image-serve.conf
name: Run validation for wrong config file
rescue:
- meta: clear_host_errors
name: Clear host errors
- debug:
msg: Detected wrong config file!
name: Status message
- block:
- name: Stopping httpd
systemd:
name: httpd
state: stopped
- include_role:
name: image_serve
name: run validation for 404
name: Ensure we detect faulty tree
rescue:
- meta: clear_host_errors
name: Clear host errors
- debug:
msg: Detected faulty image serve tree!
name: Status message
- meta: end_play
name: End play
- fail:
msg: 'The image_serve role should have detected httpd wasn''t running or
index.json is absent.
'
name: Fail the test
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.