2010-12-04 15:48:44 -08:00
|
|
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'fog')
|
2010-09-29 13:22:30 -07:00
|
|
|
require 'fog/core/bin'
|
2010-11-04 11:12:44 -07:00
|
|
|
|
2011-01-03 11:28:16 -08:00
|
|
|
# Use so you can run in mock mode from the command line
|
2010-11-21 09:02:34 -05:00
|
|
|
#
|
|
|
|
# FOG_MOCK=true fog
|
|
|
|
|
2010-05-05 21:40:21 -07:00
|
|
|
if ENV["FOG_MOCK"] == "true"
|
|
|
|
Fog.mock!
|
|
|
|
end
|
|
|
|
|
2010-11-22 17:49:27 -08:00
|
|
|
# check to see which credentials are available and add others to the skipped tags list
|
|
|
|
all_providers = ['aws', 'bluebox', 'brightbox', 'gogrid', 'google', 'linode', 'local', 'newservers', 'rackspace', 'slicehost', 'terremark']
|
|
|
|
available_providers = Fog.providers.map {|provider| provider.to_s.downcase}
|
|
|
|
for provider in (all_providers - available_providers)
|
|
|
|
Formatador.display_line("[yellow]Skipping tests for [bold]#{provider}[/] [yellow]due to lacking credentials (add some to '~/.fog' to run them)[/]")
|
|
|
|
Thread.current[:tags] << ('-' << provider)
|
|
|
|
end
|
|
|
|
|
2010-10-12 18:07:36 -07:00
|
|
|
def lorem_file
|
|
|
|
File.open(File.dirname(__FILE__) + '/lorem.txt', 'r')
|
|
|
|
end
|