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
This commit is contained in:
parent
fd2f6b4944
commit
aa559e7ea1
16
test.sh
Normal file
16
test.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user