class ForemanMaintain::Concerns::ScenarioMetadata::DSL

Constants

VALID_STRATEGIES

Public Class Methods

new(*args) click to toggle source
# File lib/foreman_maintain/concerns/scenario_metadata.rb, line 7
def initialize(*args)
  super
  # the default strategy is to fail as soon as first step fails
  run_strategy :fail_fast
end

Public Instance Methods

run_strategy(run_strategy) click to toggle source

Possible run strategies:

* +:fail_fast+ - the scenario stops as soon as the first step fails
* +:fail_slow+ - the step failure doesn't cause the scenario to stop:
                 it runs all the steps, for the tailures to be reported
                 at the end
# File lib/foreman_maintain/concerns/scenario_metadata.rb, line 19
def run_strategy(run_strategy)
  unless VALID_STRATEGIES.include?(run_strategy)
    raise "Run strategy #{run_strategy} not one of #{VALID_STRATEGIES}"
  end
  @data[:run_strategy] = run_strategy
end