Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #DEBUG="--verbose --debug"
  4. hash puppet 2>/dev/null || { echo >&2 "Please install puppet"; exit 2; }
  5. [ -z "$(facter | grep fqdn)" ] && { echo >&2 "Your machine has no FQDN (according to facter), some tests may fail or print warnings"; sleep 5; }
  6.  
  7. for dir in $(find . -type d -name tests); do
  8. for file in $(find ${dir} -name '*.pp'); do
  9. echo ">>> TESTING ${file}"
  10. puppet apply ${DEBUG} --modulepath modules --noop "${file}" || { echo ">>> ERROR" ; HAS_FAILURES="true" ; }
  11. echo "------------------------------------------------------------------------------"
  12. done
  13. done
  14.  
  15. if [ "${HAS_FAILURES}" = "true" ]; then
  16. exit 1
  17. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement