2011-07-09 02:55:55 -04:00
|
|
|
if storage_providers.keys.include? :ninefold
|
|
|
|
for provider, config in storage_providers
|
|
|
|
|
|
|
|
Shindo.tests("Storage[:ninefold] | nested directories", [provider]) do
|
|
|
|
ninefold = Fog::Storage[:ninefold]
|
|
|
|
tests("create a directory with a / character").succeeds do
|
2011-07-20 13:11:10 -04:00
|
|
|
pending if Fog.mocking?
|
2011-07-09 02:55:55 -04:00
|
|
|
ninefold.directories.create(:key => 'sub/path')
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("List of top directory returns sub dir").returns(1) do
|
2011-07-20 13:11:10 -04:00
|
|
|
pending if Fog.mocking?
|
2011-07-09 02:55:55 -04:00
|
|
|
ninefold.directories.get('sub').directories.count
|
|
|
|
end
|
|
|
|
|
2011-07-10 09:44:35 -04:00
|
|
|
tests("create a directory in a sub dir").returns('sub/path/newdir/') do
|
2011-07-20 13:11:10 -04:00
|
|
|
pending if Fog.mocking?
|
2011-07-09 02:55:55 -04:00
|
|
|
ninefold.directories.get('sub/path').directories.create(:key => 'newdir').identity
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("Recursively destroy parent dir").succeeds do
|
2011-07-20 13:11:10 -04:00
|
|
|
pending if Fog.mocking?
|
2011-07-09 02:55:55 -04:00
|
|
|
ninefold.directories.get('sub').destroy(:recursive => true)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|