diff --git a/tests/base.yaml b/tests/base.yaml index ee9eef4f..7374f51c 100644 --- a/tests/base.yaml +++ b/tests/base.yaml @@ -2,3 +2,4 @@ - include: configure-unbound.yaml - include: mirror-info.yaml - include: configure-mirrors.yaml +- include: fetch-zuul-cloner.yaml diff --git a/tests/fetch-zuul-cloner.yaml b/tests/fetch-zuul-cloner.yaml new file mode 100644 index 00000000..67b471b1 --- /dev/null +++ b/tests/fetch-zuul-cloner.yaml @@ -0,0 +1,26 @@ +- name: Test the fetch-zuul-cloner role + hosts: all + vars: + destination: "/usr/zuul-env/bin/zuul-cloner" + repo_src_dir: "/home/zuul/src/git.openstack.org" + roles: + - role: fetch-zuul-cloner + post_tasks: + - name: Check that the directory exists + file: + path: "{{ destination | dirname }}" + state: directory + register: directory + + - name: Check that the zuul-cloner shim exists + stat: + path: "{{ destination }}" + register: cloner + + - name: Validate that the shim was installed successfully + assert: + that: + - not directory | changed + - directory | succeeded + - cloner.stat.exists + - cloner.stat.mode == "0755"