Use :default from tests/.fog for test credentials

This prevents new test users from being afraid that their real accounts
may be used for fog testing when running tests without mocking.

See also #1218
This commit is contained in:
Eric Hodel 2012-10-18 17:14:23 -07:00
parent a48432a3db
commit 97e62a9b1a
2 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@
.bundle
.DS_Store
.idea
/tests/.fog
bin/*
!bin/fog
!bin/rdoc

View File

@ -1,3 +1,6 @@
ENV['FOG_RC'] = File.expand_path '../.fog', __FILE__
ENV['FOG_CREDENTIAL'] = 'default'
require 'fog'
require 'fog/bin' # for available_providers and registered_providers
@ -22,7 +25,7 @@ available_providers = Fog.available_providers.map {|provider| provider.downcase}
unavailable_providers = all_providers - available_providers
for provider in unavailable_providers
Formatador.display_line("[yellow]Skipping tests for [bold]#{provider}[/] [yellow]due to lacking credentials (add some to '~/.fog' to run them)[/]")
Formatador.display_line("[yellow]Skipping tests for [bold]#{provider}[/] [yellow]due to lacking credentials (add some to '#{Fog.credentials_path}' to run them)[/]")
Thread.current[:tags] << ('-' << provider)
end