mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1220 from drbrain/fog_test_credetials_fix
Use test-only credentials for tests, avoid unmocked tests by default
This commit is contained in:
commit
dce5e800fd
3 changed files with 6 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@
|
|||
.bundle
|
||||
.DS_Store
|
||||
.idea
|
||||
/tests/.fog
|
||||
bin/*
|
||||
!bin/fog
|
||||
!bin/rdoc
|
||||
|
|
2
Rakefile
2
Rakefile
|
@ -59,7 +59,7 @@ namespace :test do
|
|||
end
|
||||
|
||||
task :test do
|
||||
Rake::Task[:mock_tests].invoke && Rake::Task[:real_tests].invoke
|
||||
Rake::Task[:mock_tests].invoke
|
||||
end
|
||||
|
||||
def tests(mocked)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue