2014-03-13 00:50:14 +00:00
|
|
|
unless ENV['USER'] == 'vagrant'
|
|
|
|
puts 'Acceptance specs are supposed to run from one of the vagrant-lxc dev machines'
|
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
|
2014-03-13 01:15:58 +00:00
|
|
|
# FIXME: Figure out why this doesn't work
|
|
|
|
if ENV['COVERAGE'] == 'true'
|
|
|
|
require 'simplecov'
|
|
|
|
require 'coveralls'
|
|
|
|
|
|
|
|
SimpleCov.start { add_filter '/spec/' }
|
|
|
|
SimpleCov.command_name 'acceptance'
|
|
|
|
end
|
|
|
|
|
2014-03-13 00:50:14 +00:00
|
|
|
if ENV['BOX_PATH'] == nil
|
2014-03-21 20:47:49 +00:00
|
|
|
latest = ENV.fetch('LATEST_BOXES','2014-03-21')
|
|
|
|
release = ENV.fetch('RELEASE', 'acceptance')
|
2014-03-13 00:50:14 +00:00
|
|
|
local_path ="#{File.expand_path("../", __FILE__)}/boxes/output/#{latest}/vagrant-lxc-#{release}-amd64.box"
|
|
|
|
if File.exists?(local_path)
|
|
|
|
ENV['BOX_PATH'] = local_path
|
|
|
|
else
|
|
|
|
raise 'Set $BOX_PATH to the latest released boxes'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Vagrant::Spec::Acceptance.configure do |c|
|
|
|
|
c.component_paths << "spec/acceptance"
|
2014-03-13 01:15:58 +00:00
|
|
|
c.provider 'lxc', box: ENV['BOX_PATH'], features: ['!suspend']
|
2014-03-13 00:50:14 +00:00
|
|
|
end
|