Sha256: ee0eb836f9f60978fc8bad120e3e3a16c357cf3839947a4004bc152470dde496

Contents?: true

Size: 1.8 KB

Versions: 14

Compression:

Stored size: 1.8 KB

Contents

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

  @container_format = [String]

  @containers_format = [{
    'bytes' => Integer,
    'count' => Integer,
    'name'  => String
  }]

  tests('success') do

    tests("#put_container('fogcontainertests')").succeeds do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].put_container('fogcontainertests')
    end

    tests("#get_container('fogcontainertests')").formats(@container_format) do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].get_container('fogcontainertests').body
    end

    tests("#get_containers").formats(@containers_format) do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].get_containers.body
    end

    tests("#head_container('fogcontainertests')").succeeds do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].head_container('fogcontainertests')
    end

    tests("#head_containers").succeeds do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].head_containers
    end

    tests("#delete_container('fogcontainertests')").succeeds do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].delete_container('fogcontainertests')
    end

  end

  tests('failure') do

    tests("#get_container('fognoncontainer')").raises(Fog::Storage::Rackspace::NotFound) do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].get_container('fognoncontainer')
    end

    tests("#head_container('fognoncontainer')").raises(Fog::Storage::Rackspace::NotFound) do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].head_container('fognoncontainer')
    end

    tests("#delete_container('fognoncontainer')").raises(Fog::Storage::Rackspace::NotFound) do
      pending if Fog.mocking?
      Fog::Storage[:rackspace].delete_container('fognoncontainer')
    end

  end

end

Version data entries

14 entries across 14 versions & 6 rubygems

Version Path
fog-nirvanix-1.8.2 tests/rackspace/requests/storage/container_tests.rb
fog-nirvanix-1.8.1 tests/rackspace/requests/storage/container_tests.rb
fog-parser-fix-1.6.1 tests/rackspace/requests/storage/container_tests.rb
fog-test-again-1.6.0 tests/rackspace/requests/storage/container_tests.rb
fog-parser-fix-1.6.0 tests/rackspace/requests/storage/container_tests.rb
fog-1.9.0 tests/rackspace/requests/storage/container_tests.rb
fog-maestrodev-1.8.0.20130114204828 tests/rackspace/requests/storage/container_tests.rb
fog-maestrodev-1.8.0.20130111070250 tests/rackspace/requests/storage/container_tests.rb
fog-maestrodev-1.8.0.20130109172219 tests/rackspace/requests/storage/container_tests.rb
fog-sgonyea-1.8.1 tests/rackspace/requests/storage/container_tests.rb
fog-1.8.0 tests/rackspace/requests/storage/container_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/rackspace/requests/storage/container_tests.rb
fog-1.7.0 tests/rackspace/requests/storage/container_tests.rb
fog-1.6.0 tests/rackspace/requests/storage/container_tests.rb