From 55af4b11e04619bccbed3cf7fa0e2e4cb9c20203 Mon Sep 17 00:00:00 2001 From: Trevor Vaughan Date: Tue, 11 Jan 2022 16:49:35 -0500 Subject: [PATCH] Worked around a bug in 'puppet lookup' - PUP-11402 (#163) Closes #162 --- CHANGELOG.md | 1 + lib/simp/beaker_helpers.rb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f02148..d7f63b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 1.24.1 / 2021-10-27 * Fixed: + * Worked around a bug in 'puppet lookup' - PUP-11402 * Updated calls to the operating system fact when connecting to RHSM ### 1.24.0 / 2021-10-05 diff --git a/lib/simp/beaker_helpers.rb b/lib/simp/beaker_helpers.rb index 2ea88ba..45686a7 100644 --- a/lib/simp/beaker_helpers.rb +++ b/lib/simp/beaker_helpers.rb @@ -1244,8 +1244,11 @@ def copy_hiera_data_to(sut, path) # # @returns [String] Path to the Hieradata directory on the target system def hiera_datadir(sut) + # A workaround for PUP-11042 + sut_environment = sut.puppet_configprint['environment'] + # This output lets us know where Hiera is configured to look on the system - puppet_lookup_info = on(sut, 'puppet lookup --explain test__simp__test', :silent => true).output.strip.lines + puppet_lookup_info = on(sut, "puppet lookup --explain --environment #{sut_environment} test__simp__test", :silent => true).output.strip.lines if sut.puppet_configprint['manifest'].nil? || sut.puppet_configprint['manifest'].empty? fail("No output returned from `puppet config print manifest` on #{sut}")