Sha256: 601d4a739f03d8fe9866bc47392d9fcc84cecbf38d5a96e665333b08b07919ef

Contents?: true

Size: 1.47 KB

Versions: 32

Compression:

Stored size: 1.47 KB

Contents

Shindo.tests('Fog::Storage[:rackspace] | large object requests', [:rackspace]) do

  unless Fog.mocking?
    @directory = Fog::Storage[:rackspace].directories.create(:key => 'foglargeobjecttests')
  end

  tests('success') do

    tests("#put_object('foglargeobjecttests', '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('foglargeobjecttests', '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('foglargeobjecttests', 'fog_large_object')").succeeds do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].put_object_manifest(@directory.identity, 'fog_large_object')
    end

    tests("#get_object('foglargeobjecttests', '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

    unless 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

  unless Fog.mocking?
    @directory.destroy
  end

end

Version data entries

32 entries across 32 versions & 8 rubygems

Version Path
fog-1.5.0 tests/rackspace/requests/storage/large_object_tests.rb
rackspace-fog-1.4.2 tests/rackspace/requests/storage/large_object_tests.rb
fog-1.4.0 tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
michiels-fog-1.3.1 tests/rackspace/requests/storage/large_object_tests.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
fog-1.3.1 tests/rackspace/requests/storage/large_object_tests.rb
fog-1.3.0 tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
fog-1.2.0 tests/rackspace/requests/storage/large_object_tests.rb
ktheory-fog-1.1.2 tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/storage/large_object_tests.rb
fog-1.1.2 tests/rackspace/requests/storage/large_object_tests.rb
fog_tractical-1.1.4 tests/rackspace/requests/storage/large_object_tests.rb
fog_tractical-1.1.3 tests/rackspace/requests/storage/large_object_tests.rb