mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
07f788cf64
closes #228
43 lines
1.4 KiB
Ruby
43 lines
1.4 KiB
Ruby
Shindo.tests('Fog::Storage[:rackspace] | large object requests', [:rackspace]) do
|
|
|
|
@directory = Fog::Storage[:rackspace].directories.create(:key => 'foglargeobjecttests')
|
|
|
|
tests('success') do
|
|
|
|
tests("#put_object('#{@directory.identity}', 'fog_large_object/1', ('x' * 6 * 1024 * 1024))").succeeds do
|
|
pending if Fog.mocking?
|
|
Fog::Storage[:rackspace].put_object(@directory.identity, 'fog_large_object/1', ('x' * 6 * 1024 * 1024))
|
|
end
|
|
|
|
tests("#put_object('#{@directory.identity}', 'fog_large_object/2', ('x' * 4 * 1024 * 1024))").succeeds do
|
|
pending if Fog.mocking?
|
|
Fog::Storage[:rackspace].put_object(@directory.identity, 'fog_large_object/2', ('x' * 4 * 1024 * 1024))
|
|
end
|
|
|
|
tests("#put_object_manifest('#{@directory.identity}', 'fog_large_object')").succeeds do
|
|
pending if Fog.mocking?
|
|
Fog::Storage[:rackspace].put_object_manifest(@directory.identity, 'fog_large_object')
|
|
end
|
|
|
|
tests("#get_object('#{@directory.identity}', 'fog_large_object').body").succeeds do
|
|
pending if Fog.mocking?
|
|
Fog::Storage[:rackspace].get_object(@directory.identity, 'fog_large_object').body == ('x' * 10 * 1024 * 1024)
|
|
end
|
|
|
|
if !Fog.mocking?
|
|
['fog_large_object', 'fog_large_object/1', 'fog_large_object/2'].each do |key|
|
|
@directory.files.new(:key => key).destroy
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
tests('failure') do
|
|
|
|
tests("put_object_manifest")
|
|
|
|
end
|
|
|
|
@directory.destroy
|
|
|
|
end
|