Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
(maint) Ensure get_acceptable_puppet_run_exit_codes emits an array
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
glennsarti committed Mar 21, 2018
1 parent 23f1c42 commit 3172cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/beaker/testmode_switcher/runner_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3172cd1

Please sign in to comment.