61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# File 'lib/puppetlabs_spec_helper/tasks/beaker.rb', line 61
def self.setup_beaker(t)
t.rspec_opts = ['--color']
t.pattern = 'spec/acceptance'
if ENV['TEST_TIERS']
test_tiers = ENV['TEST_TIERS'].split(',')
raise 'TEST_TIERS env variable must have at least 1 tier specified. low, medium or high (comma separated).' if test_tiers.count == 0
test_tiers.each do |tier|
tier_to_add = tier.strip.downcase
raise "#{tier_to_add} not a valid test tier." unless %w[low medium high].include?(tier_to_add)
tiers = "--tag tier_#{tier_to_add}"
t.rspec_opts.push(tiers)
end
else
puts 'TEST_TIERS env variable not defined. Defaulting to run all tests.'
end
t
end
|