From 3172cd1d7f5f82b37456a41b006332c7382ca03b Mon Sep 17 00:00:00 2001 From: Glenn Sarti Date: Wed, 21 Mar 2018 14:30:12 +0800 Subject: [PATCH] (maint) Ensure get_acceptable_puppet_run_exit_codes emits an array Previously if none of the catch_* and expect_* options where set the get_acceptable_puppet_run_exit_codes method would emit a Range (0..256). However this raised errors in the handle_puppet_run_returned_exit_code method because you cannot do a `.join` on a Range. This commit instead always outputs an array type from get_acceptable_puppet_run_exit_codes. --- lib/beaker/testmode_switcher/runner_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/beaker/testmode_switcher/runner_base.rb b/lib/beaker/testmode_switcher/runner_base.rb index 2615cb4..e554842 100644 --- a/lib/beaker/testmode_switcher/runner_base.rb +++ b/lib/beaker/testmode_switcher/runner_base.rb @@ -23,7 +23,7 @@ def get_acceptable_puppet_run_exit_codes(opts = {}) # If no option supplied, return all exit codes, as an array, # as acceptable so beaker returns a detailed output - (0...256) + (0...256).map { |i| i } end def handle_puppet_run_returned_exit_code(acceptable_exit_codes, returned_exit_code)