Skip to content

Commit 6f05dae

Browse files
committed
(maint) Fix puppet-lint test
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.
1 parent de33324 commit 6f05dae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function runtest() {
1818

1919
output=$($cmd 2>&1)
2020
exitcode=$?
21-
21+
2222
if [ "$greptext" != "" ]; then
2323
echo -e $output | grep -q "$greptext"
2424

@@ -56,7 +56,7 @@ runtest 'Manifests with good syntax' "docker run -v `pwd`/control-repo/goodsynta
5656
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";
5757
runtest 'Hiera with good syntax' "docker run -v `pwd`/control-repo/goodsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile syntax:hiera" 0 '';
5858

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";
6060
runtest 'Linting check finds no errors' "docker run -v `pwd`/control-repo/goodsyntax:/repo ${DOCKER_IMAGE} rake -f /Rakefile lint syntax yamllint" 0 '';
6161

6262
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

Comments
 (0)