2011-01-10 01:12:48 -05:00
|
|
|
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), %w[ .. lib fog]))
|
|
|
|
require 'fog'
|
|
|
|
require 'fog/bin'
|
2010-11-04 14:12:44 -04:00
|
|
|
|
2011-01-21 20:42:56 -05:00
|
|
|
require File.join(File.dirname(__FILE__), 'helpers', 'mock_helper')
|
2010-11-21 09:02:34 -05:00
|
|
|
|
2011-01-21 20:42:56 -05:00
|
|
|
def lorem_file
|
|
|
|
File.open(File.dirname(__FILE__) + '/lorem.txt', 'r')
|
2011-01-14 14:01:02 -05:00
|
|
|
end
|
|
|
|
|
2010-11-22 20:49:27 -05:00
|
|
|
# check to see which credentials are available and add others to the skipped tags list
|
2011-01-21 20:43:27 -05:00
|
|
|
all_providers = ['aws', 'bluebox', 'brightbox', 'gogrid', 'google', 'linode', 'local', 'newservers', 'rackspace', 'slicehost', 'terremarkecloud', 'zerigo']
|
2010-11-22 20:49:27 -05:00
|
|
|
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
|