Sha256: 35620089e89f43afe585b7c37223333ab0478539711aa1148a41d4e9a6d9aa9c

Contents?: true

Size: 1.33 KB

Versions: 38

Compression:

Stored size: 1.33 KB

Contents

Shindo.tests('AWS::Compute | tag requests', ['aws']) do

  @tags_format = {
    'tagSet'    => [{
      'key'          => String,
      'resourceId'   => String,
      'resourceType' => String,
      'value'        => String
    }],
    'requestId' => String
  }

  @volume = AWS[:compute].volumes.create(:availability_zone => 'us-east-1a', :size => 1)
  @volume.wait_for { ready? }

  tests('success') do

    tests("#create_tags('#{@volume.identity}', 'foo' => 'bar')").formats(AWS::Compute::Formats::BASIC) do
      AWS[:compute].create_tags(@volume.identity, 'foo' => 'bar').body
    end

    tests('#describe_tags').formats(@tags_format) do
      pending if Fog.mocking?
      AWS[:compute].describe_tags.body
    end

    tests("#delete_tags('#{@volume.identity}', 'foo' => 'bar')").formats(AWS::Compute::Formats::BASIC) do
      pending if Fog.mocking?
      AWS[:compute].delete_tags(@volume.identity, 'foo' => 'bar').body
    end

  end

  tests('failure') do

    tests("#create_tags('vol-00000000', 'baz' => 'qux')").raises(Fog::Service::NotFound) do
      AWS[:compute].create_tags('vol-00000000', 'baz' => 'qux')
    end

    tests("#delete_tags('vol-00000000', 'baz' => 'qux')").raises(Fog::Service::NotFound) do
      pending if Fog.mocking?
      AWS[:compute].delete_tags('vol-00000000', 'baz' => 'qux')
    end

  end

  @volume.destroy

end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
fog-0.6.0 tests/compute/requests/aws/tag_tests.rb
fog-0.5.3 tests/compute/requests/aws/tag_tests.rb
fog-0.5.2 tests/compute/requests/aws/tag_tests.rb
fog-0.5.1 tests/compute/requests/aws/tag_tests.rb
fog-0.5.0 tests/compute/requests/aws/tag_tests.rb
phpfog-fog-0.4.1.3 tests/compute/requests/aws/tag_tests.rb
phpfog-fog-0.4.1.2 tests/compute/requests/aws/tag_tests.rb
phpfog-fog-0.4.1.1 tests/compute/requests/aws/tag_tests.rb
phpfog-fog-0.4.1 tests/compute/requests/aws/tag_tests.rb
fog-0.4.1 tests/compute/requests/aws/tag_tests.rb
fog-0.4.0 tests/compute/requests/aws/tag_tests.rb
fog-0.3.34 tests/aws/requests/compute/tag_tests.rb
fog-0.3.33 tests/aws/requests/compute/tag_tests.rb
fog-0.3.32 tests/aws/requests/compute/tag_tests.rb
fog-0.3.31 tests/aws/requests/compute/tag_tests.rb
fog-0.3.30 tests/aws/requests/compute/tag_tests.rb
fog-0.3.29 tests/aws/requests/compute/tag_tests.rb
fog-0.3.28 tests/aws/requests/compute/tag_tests.rb
fog-0.3.27 tests/aws/requests/compute/tag_tests.rb
fog-0.3.26 tests/aws/requests/compute/tag_tests.rb