mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[local|storage] fixes for pending mocked tests
This commit is contained in:
parent
d7ae0956be
commit
ca360be0ed
6 changed files with 36 additions and 28 deletions
|
@ -25,7 +25,7 @@ if Fog.mock?
|
|||
:google_storage_access_key_id => 'google_storage_access_key_id',
|
||||
:google_storage_secret_access_key => 'google_storage_secret_access_key',
|
||||
:linode_api_key => 'linode_api_key',
|
||||
# :local_root => '~/.fog'
|
||||
:local_root => '~/.fog',
|
||||
:new_servers_password => 'new_servers_password',
|
||||
:new_servers_username => 'new_servers_username',
|
||||
# :public_key_path => '~/.ssh/id_rsa.pub',
|
||||
|
|
|
@ -7,7 +7,7 @@ def storage_providers
|
|||
:mocked => true
|
||||
},
|
||||
Local => {
|
||||
:mocked => true
|
||||
:mocked => false
|
||||
},
|
||||
Rackspace => {
|
||||
:mocked => false
|
||||
|
|
|
@ -2,11 +2,15 @@ for provider, config in storage_providers
|
|||
|
||||
Shindo.tests("#{provider}::Storage | directories", [provider.to_s.downcase]) do
|
||||
|
||||
directory_attributes = {
|
||||
:key => 'fogdirectoriestests',
|
||||
}.merge!(config[:directory_attributes] || {})
|
||||
if !Fog.mocking? || config[:mocked]
|
||||
|
||||
collection_tests(provider[:storage].directories, directory_attributes, config[:mocked])
|
||||
directory_attributes = {
|
||||
:key => 'fogdirectoriestests',
|
||||
}.merge!(config[:directory_attributes] || {})
|
||||
|
||||
collection_tests(provider[:storage].directories, directory_attributes, config[:mocked])
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -2,20 +2,24 @@ for provider, config in storage_providers
|
|||
|
||||
Shindo.tests("#{provider}::Storage | directory", [provider.to_s.downcase]) do
|
||||
|
||||
directory_attributes = {
|
||||
:key => 'fogdirectorytests'
|
||||
}.merge!(config[:directory_attributes] || {})
|
||||
if !Fog.mocking? || config[:mocked]
|
||||
|
||||
model_tests(provider[:storage].directory, directory_attributes, config[:mocked]) do
|
||||
directory_attributes = {
|
||||
:key => 'fogdirectorytests'
|
||||
}.merge!(config[:directory_attributes] || {})
|
||||
|
||||
tests("#public=(true)").succeeds do
|
||||
pending if Fog.mocking? && !config[:mocked]
|
||||
@instance.public=(true)
|
||||
end
|
||||
model_tests(provider[:storage].directory, directory_attributes, config[:mocked]) do
|
||||
|
||||
tests("#public=(true)").succeeds do
|
||||
pending if Fog.mocking? && !config[:mocked]
|
||||
@instance.public=(true)
|
||||
end
|
||||
|
||||
tests('responds_to(:public_url)') do
|
||||
pending if Fog.mocking? && !config[:mocked]
|
||||
@instance.responds_to(:public_url)
|
||||
end
|
||||
|
||||
tests('responds_to(:public_url)') do
|
||||
pending if Fog.mocking? && !config[:mocked]
|
||||
@instance.responds_to(:public_url)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,14 +2,14 @@ for provider, config in storage_providers
|
|||
|
||||
Shindo.tests("#{provider}::Storage | file", [provider.to_s.downcase]) do
|
||||
|
||||
file_attributes = {
|
||||
:key => 'fog_file_tests',
|
||||
:body => lorem_file,
|
||||
:public => true
|
||||
}.merge!(config[:file_attributes] || {})
|
||||
|
||||
if !Fog.mocking? || config[:mocked]
|
||||
|
||||
file_attributes = {
|
||||
:key => 'fog_file_tests',
|
||||
:body => lorem_file,
|
||||
:public => true
|
||||
}.merge!(config[:file_attributes] || {})
|
||||
|
||||
directory_attributes = {
|
||||
:key => 'fogfilestests'
|
||||
}.merge!(config[:directory_attributes] || {})
|
||||
|
|
|
@ -2,13 +2,13 @@ for provider, config in storage_providers
|
|||
|
||||
Shindo.tests("#{provider}::Storage | files", [provider.to_s.downcase]) do
|
||||
|
||||
file_attributes = {
|
||||
:key => 'fog_files_tests',
|
||||
:body => lorem_file
|
||||
}.merge!(config[:file_attributes] || {})
|
||||
|
||||
if !Fog.mocking? || config[:mocked]
|
||||
|
||||
file_attributes = {
|
||||
:key => 'fog_files_tests',
|
||||
:body => lorem_file
|
||||
}.merge!(config[:file_attributes] || {})
|
||||
|
||||
directory_attributes = {
|
||||
:key => 'fogfilestests'
|
||||
}.merge!(config[:directory_attributes] || {})
|
||||
|
|
Loading…
Add table
Reference in a new issue