Sha256: 2bd3071031612480f758799065c07bd53adc52303c545bd6dde0ef22b8b8893a

Contents?: true

Size: 1.71 KB

Versions: 18

Compression:

Stored size: 1.71 KB

Contents

Shindo.tests('Fog::Compute[:aws] | spot datafeed subscription requests', ['aws']) do
  @spot_datafeed_subscription_format = {
    'spotDatafeedSubscription' => {
      'bucket'  => String,
      'ownerId' => String,
      'prefix'  => String,
      'state'   => String
    },
    'requestId' => String
  }

  @directory = Fog::Storage[:aws].directories.create(:key => 'fogspotdatafeedsubscriptiontests')

  tests('success') do
    pending if Fog.mocking?

    tests("#create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/')").formats(@spot_datafeed_subscription_format) do
      Fog::Compute[:aws].create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/').body
    end

    tests("duplicate #create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/')").succeeds do
      Fog::Compute[:aws].create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/')
    end

    tests("#describe_spot_datafeed_subscription").formats(@spot_datafeed_subscription_format) do
      Fog::Compute[:aws].describe_spot_datafeed_subscription.body
    end

    tests("#delete_spot_datafeed_subscription").formats(AWS::Compute::Formats::BASIC) do
      Fog::Compute[:aws].delete_spot_datafeed_subscription.body
    end

    tests("duplicate #delete_spot_datafeed_subscription").succeeds do
      Fog::Compute[:aws].delete_spot_datafeed_subscription
    end
  end

  tests('failure') do
    pending if Fog.mocking?

    tests("#describe_spot_datafeed_subscription").raises(Fog::AWS::Compute::NotFound) do
      Fog::Compute[:aws].describe_spot_datafeed_subscription
    end
  end

  @directory.destroy
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
fog-aws-3.12.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.11.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.10.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.9.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.8.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.7.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.6.7 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.6.6 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.6.5 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.6.4 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.6.3 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.6.2 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.5.2 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.5.1 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.5.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.4.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.3.0 tests/requests/compute/spot_datafeed_subscription_tests.rb
fog-aws-3.2.0 tests/requests/compute/spot_datafeed_subscription_tests.rb