Integration testing for mirror info script

This adds a job to assert the mirror-info script is created correctly.

Change-Id: I56f7b1d6e94c81dceebb14d27ba4aa59e9874245
This commit is contained in:
Ian Wienand 2017-09-08 10:06:44 +10:00
parent 8c544a5ef6
commit ae638f8c43
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,4 @@
# Roles that are part of the 'base' job
- include: configure-mirrors.yaml
- include: mirror-info.yaml

14
tests/mirror-info.yaml Normal file
View File

@ -0,0 +1,14 @@
- name: Test the creation of the mirror-info script
hosts: all
roles:
role: mirror-info
mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
post_tasks:
- name: Check mirror script
stat:
path: /etc/ci/mirror_info.sh
register: stat_result
- assert:
that:
- "stat_result.stat.exists"
- "stat_result.stat.mode == 0644"