rake mock[<provider>] and live[<provider] tasks

This commit is contained in:
Max Lincoln 2013-10-29 14:41:47 -03:00
parent ddf053f34e
commit 3e73582d42
1 changed files with 19 additions and 1 deletions

View File

@ -65,6 +65,24 @@ namespace :test do
end end
end end
desc 'Run mocked tests for a specific provider'
task :mock, :provider do |t, args|
if args.to_a.size != 1
fail 'USAGE: rake live[<provider>]'
end
provider = args[:provider]
sh("export FOG_MOCK=true && bundle exec shindont tests/#{provider}")
end
desc 'Run live tests against a specific provider'
task :live, :provider do |t, args|
if args.to_a.size != 1
fail 'USAGE: rake live[<provider>]'
end
provider = args[:provider]
sh("export FOG_MOCK=false && bundle exec shindont tests/#{provider}")
end
task :nuke do task :nuke do
Fog.providers.each do |provider| Fog.providers.each do |provider|
next if ['Vmfusion'].include?(provider) next if ['Vmfusion'].include?(provider)
@ -195,4 +213,4 @@ task :coveralls_push_workaround do
Coveralls::RakeTask.new Coveralls::RakeTask.new
Rake::Task["coveralls:push"].invoke Rake::Task["coveralls:push"].invoke
end end
end end