openstack-zuul-jobs/tests/use-cached-repos.yaml
David Moreau-Simard a80691a49c
Add integration tests for use-cached-repos
Change-Id: I7da4db4ddd058b507754178177344b99363025ac
2017-10-19 17:12:40 -04:00

25 lines
963 B
YAML

- name: Test the use-cached-repos role
hosts: all
roles:
- role: use-cached-repos
post_tasks:
# openstack-infra/project-config is in 'required-projects'.
# openstack-infra/opentack-zuul-jobs is also implicitly in 'projects'.
# We're checking them explicitly rather than with_items on zuul.projects
# in case there is a regression which would take an item out.
- name: Check that openstack-infra/project-config was prepared
stat:
path: "{{ ansible_user_dir }}/src/git.openstack.org/openstack-infra/project-config"
register: project_config
- name: Check that openstack-infra/openstack-zuul-jobs was prepared
stat:
path: "{{ ansible_user_dir }}/src/git.openstack.org/openstack-infra/openstack-zuul-jobs"
register: ozj_config
- name: Validate that required projects have been prepared
assert:
that:
- project_config.stat.exists
- ozj_config.stat.exists