system-config/test.sh
Monty Taylor aa559e7ea1 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 <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-07 07:12:52 +00:00

17 lines
656 B
Bash

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