Skip to content

Commit

Permalink
Make regexes shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Nov 22, 2023
1 parent 91bad04 commit 4ac1fc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/beaker/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def execute!
end

# Setup perf monitoring if needed
@perf = Beaker::Perf.new(@hosts, @options) if /(aggressive)|(normal)/.match?(@options[:collect_perf_data].to_s)
@perf = Beaker::Perf.new(@hosts, @options) if /aggressive|normal/.match?(@options[:collect_perf_data].to_s)

# pre acceptance phase
run_suite(:pre_suite, :fast)
Expand Down Expand Up @@ -138,7 +138,7 @@ def execute!
end

# cleanup on error
if /(never)|(onpass)/.match?(@options[:preserve_hosts].to_s)
if /never|onpass/.match?(@options[:preserve_hosts].to_s)
@logger.notify "Cleanup: cleaning up after failed run"
@network_manager.cleanup if @network_manager
else
Expand All @@ -159,7 +159,7 @@ def execute!
end

# cleanup on success
if /(never)|(onfail)/.match?(@options[:preserve_hosts].to_s)
if /never|onfail/.match?(@options[:preserve_hosts].to_s)
@logger.notify "Cleanup: cleaning up after successful run"
@network_manager.cleanup if @network_manager
else
Expand Down

0 comments on commit 4ac1fc5

Please sign in to comment.