You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the `legacy_facts` plugin was incorporated into core puppet-lint,
they changed the message it emits when a legacy fact is detected to
include the name of the fact. This commit updates the test to match the
new message.
There was also a new check added that ensures there is only a single
space before an arrow `=>` when there is only a single parameter in a
resource. We had a resource with a second param commented out, where we
never adjusted the spacing for the one that was left. This now failed
the linter, so this commit updates the spacing to make it happy, since
that was in the `goodsyntax` test.
Copy file name to clipboardExpand all lines: tests/run_tests.sh
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ function runtest() {
18
18
19
19
output=$($cmd2>&1)
20
20
exitcode=$?
21
-
21
+
22
22
if [ "$greptext"!="" ];then
23
23
echo -e $output| grep -q "$greptext"
24
24
@@ -56,7 +56,7 @@ runtest 'Manifests with good syntax' "docker run -v `pwd`/control-repo/goodsynta
56
56
runtest 'Hiera with bad syntax'"docker run -v `pwd`/control-repo/badsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile syntax:hiera" 1 "ERROR: Failed to parse data/common.yaml: (data/common.yaml): could not find expected ':' while scanning a simple key at line 4 column 1";
57
57
runtest 'Hiera with good syntax'"docker run -v `pwd`/control-repo/goodsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile syntax:hiera" 0 '';
58
58
59
-
runtest 'Linting check catches errors'"docker run -v `pwd`/control-repo/badsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile lint syntax yamllint" 1 'site/profile/manifests/common.pp - WARNING: legacy fact on line 5';
59
+
runtest 'Linting check catches errors'"docker run -v `pwd`/control-repo/badsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile lint syntax yamllint" 1 "site/profile/manifests/common.pp - WARNING: legacy fact 'osfamily' on line 5";
60
60
runtest 'Linting check finds no errors'"docker run -v `pwd`/control-repo/goodsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile lint syntax yamllint" 0 '';
61
61
62
62
runtest 'rspec-puppet passes Deferred unwrap test'"docker run -v `pwd`/module/test:/repo ${DOCKER_IMAGE} pdk test unit --tests spec/classes/defer_spec.rb --clean-fixtures" 0
0 commit comments