From 23ae39137c7b9dc8dd40ba7db612768610b87417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Fri, 23 Mar 2018 22:58:46 +0100 Subject: [PATCH] Avoid warnings when using puppet config print (#64) Since https://tickets.puppetlabs.com/browse/PUP-2868, we receive a warning if we don't specify the section. This is a problem for puppet 5.5. This warning was parsed by ruby and provide incorrect return. We need to ignore stderr as we still have a problem with https://tickets.puppetlabs.com/browse/PUP-8566 --- CHANGELOG.md | 3 +++ lib/simp/beaker_helpers.rb | 2 +- lib/simp/beaker_helpers/version.rb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dfecc8..7900951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.10.3 / 2018-03-23 +* Avoid warnings when using `puppet config print` + ### 1.10.2 / 2018-03-04 * Reimplemented `pluginsync_on` with a Puppet manifest to completely mimic a native pluginsync diff --git a/lib/simp/beaker_helpers.rb b/lib/simp/beaker_helpers.rb index 72f3a84..8d11135 100644 --- a/lib/simp/beaker_helpers.rb +++ b/lib/simp/beaker_helpers.rb @@ -74,7 +74,7 @@ def pfact_on(sut, fact_name) # Returns the modulepath on the SUT, as an Array def puppet_modulepath_on(sut, environment='production') on( - sut, "puppet config print modulepath --environment #{environment}" + sut, "puppet config print --section main modulepath --environment #{environment} 2>/dev/null" ).output.lines.last.strip.split(':') end diff --git a/lib/simp/beaker_helpers/version.rb b/lib/simp/beaker_helpers/version.rb index 31f4f54..06fd2e0 100644 --- a/lib/simp/beaker_helpers/version.rb +++ b/lib/simp/beaker_helpers/version.rb @@ -1,5 +1,5 @@ module Simp; end module Simp::BeakerHelpers - VERSION = '1.10.2' + VERSION = '1.10.3' end