From c8c0dfec975e0b735a437968ddfa8813d534cb35 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Sat, 19 Dec 2020 11:40:53 -0600 Subject: [PATCH] (SIMP-8925) Use stdout instead of output in pfact_on (#135) This avoids problems with JSON parsing when there is output on stderr. SIMP-8925 #close --- CHANGELOG.md | 1 + lib/simp/beaker_helpers.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c43a1..efc8cde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Fixed the file_content_on method * Removed EL 6 support from the tests since the core repos are defunct * Started removing some of the puppet 4 tests + * Fixed an issue with pfact_on ### 1.19.0 / 2020-09-30 * Fixed: diff --git a/lib/simp/beaker_helpers.rb b/lib/simp/beaker_helpers.rb index fe04993..d578931 100644 --- a/lib/simp/beaker_helpers.rb +++ b/lib/simp/beaker_helpers.rb @@ -114,7 +114,7 @@ def copy_to(sut, src, dest, opts={}) # use the `puppet fact` face to look up facts on an SUT def pfact_on(sut, fact_name) - facts_json = on(sut,'puppet facts find xxx').output + facts_json = on(sut,'puppet facts find xxx').stdout facts = JSON.parse(facts_json).fetch( 'values' ) facts.fetch(fact_name) end