Files
openstack-zuul-jobs/tests/ensure-output-dirs.yaml
Monty Taylor c5183d416d Use is instead of | for tests
Newer ansible wants us to use is. Also, it reads more nicer.

Change-Id: I368369d146a422abbf94265036a7d280e47eedc0
2019-01-07 14:10:32 +00:00

33 lines
935 B
YAML

- name: Test the ensure-output-dirs role
hosts: all
roles:
- role: ensure-output-dirs
post_tasks:
- name: Check that log dir has been created
file:
path: "{{ zuul_output_dir }}/logs"
state: directory
register: log_directory
- name: Check that artifact dir has been created
file:
path: "{{ zuul_output_dir }}/artifacts"
state: directory
register: artifact_directory
- name: Check that doc dir has been created
file:
path: "{{ zuul_output_dir }}/docs"
state: directory
register: doc_directory
- name: Validate that directories were set correctly
assert:
that:
- log_directory is not changed
- log_directory is succeeded
- artifact_directory is not changed
- artifact_directory is succeeded
- doc_directory is not changed
- doc_directory is succeeded