Browse Source

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
changes/72/652472/2
Ian Wienand 1 month ago
parent
commit
6a1d4da730
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      tools/apply-test.sh

+ 7
- 2
tools/apply-test.sh View File

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

Loading…
Cancel
Save