Skip to content

Commit

Permalink
notify and gracefully skip credential-less testsa
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Nov 23, 2010
1 parent e61ea3c commit 1cde6c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/helper.rb
Expand Up @@ -28,6 +28,14 @@
Fog.mock!
end

# 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

# Boolean hax
module Fog
module Boolean
Expand Down

0 comments on commit 1cde6c4

Please sign in to comment.