Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #DEBUG="--verbose --debug"
- hash puppet 2>/dev/null || { echo >&2 "Please install puppet"; exit 2; }
- [ -z "$(facter | grep fqdn)" ] && { echo >&2 "Your machine has no FQDN (according to facter), some tests may fail or print warnings"; sleep 5; }
- for dir in $(find . -type d -name tests); do
- for file in $(find ${dir} -name '*.pp'); do
- echo ">>> TESTING ${file}"
- puppet apply ${DEBUG} --modulepath modules --noop "${file}" || { echo ">>> ERROR" ; HAS_FAILURES="true" ; }
- echo "------------------------------------------------------------------------------"
- done
- done
- if [ "${HAS_FAILURES}" = "true" ]; then
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement