Add Puppet-Version: !X skip to apply tests

Setting Puppet-Version: !X (where X would usually be 3) marks a hosts
as not wanting to run the apply tests for that puppet version.  This
is helpful for puppet4 hosts that wish to bring in new modules that
are not puppet3 compatible.

Change-Id: I081d15a53bd85152e7729c4c1da094dfee6d7073
This commit is contained in:
Ian Wienand 2019-04-15 11:40:28 +10:00
parent c5698ead6a
commit 6a1d4da730

View File

@ -49,8 +49,13 @@ fi
FOUND=0
for f in `find applytest -name 'puppetapplytest*' -print` ; do
if grep -q "Node-OS: $CODENAME" $f; then
cat applytest/head $f > $f.final
FOUND=1
if grep -q "Puppet-Version: !${PUPPET_VERSION}" $f; then
echo "Skipping $f due to unsupported puppet version"
continue
else
cat applytest/head $f > $f.final
FOUND=1
fi
fi
done