From aa559e7ea10b100fe822713c0c7b72130b18d38c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 4 Aug 2012 11:30:06 -0500 Subject: [PATCH] Add Clark's testing stuff to the tree. This way, I can easily run it locally before submitting. Also, updated a little bit to put in some hacks around hiera calls. Change-Id: Ie4f3de6d81d915fbf06e896f31362c836fd244a9 Reviewed-on: https://review.openstack.org/10834 Approved: Monty Taylor Reviewed-by: Monty Taylor Tested-by: Jenkins --- test.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test.sh diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..4f4e091 --- /dev/null +++ b/test.sh @@ -0,0 +1,16 @@ +find . -iname '*.pp' | xargs puppet parser validate --modulepath=`pwd`/modules +for f in `find . -iname *.erb` ; do + erb -x -T '-' $f | ruby -c >/dev/null || echo "Error in $f" +done + +if [ ! -d applytest ] ; then + mkdir applytest +fi + +csplit -sf applytest/puppetapplytest manifests/site.pp '/^$/' {*} +sed -i -e 's/^[^[:space:]]/#&/g' applytest/puppetapplytest* +sed -i -e 's/hiera..listadmins../["admin"]/' applytest/puppetapplytest* +sed -i -e 's/hiera.*/PASSWORD,/' applytest/puppetapplytest* +for f in `find applytest -name 'puppetapplytest*' -print` ; do + puppet apply --modulepath=./modules:/etc/puppet/modules -v --noop --debug $f >/dev/null +done