Sha256: 8251cffcfcad4fa89d56e679c21ad6ca7de20009b21754293972eef54bdf94bb

Contents?: true

Size: 1.39 KB

Versions: 63

Compression:

Stored size: 1.39 KB

Contents

Shindo.tests('AWS::RDS | event subscription requests', ['aws', 'rds']) do
  pending unless Fog.mocking?

  @name = 'fog'
  @arn  = 'arn:aws:sns:us-east-1:12345678910:fog'

  tests('success') do
    tests('#create_event_subscription').formats(AWS::RDS::Formats::CREATE_EVENT_SUBSCRIPTION) do
      body = Fog::AWS[:rds].create_event_subscription('SubscriptionName' => @name, 'SnsTopicArn' => @arn).body

      returns(@name) { body['CreateEventSubscriptionResult']['EventSubscription']['CustSubscriptionId'] }
      returns('creating') { body['CreateEventSubscriptionResult']['EventSubscription']['Status'] }
      body
    end

    tests("#describe_event_subscriptions").formats(AWS::RDS::Formats::DESCRIBE_EVENT_SUBSCRIPTIONS) do
      returns('active') { Fog::AWS[:rds].describe_event_subscriptions.body['DescribeEventSubscriptionsResult']['EventSubscriptionsList'].first['Status'] }
      Fog::AWS[:rds].describe_event_subscriptions.body
    end

    tests("#delete_event_subscription").formats(AWS::RDS::Formats::BASIC) do
      body = Fog::AWS[:rds].delete_event_subscription(@name).body

      returns('deleting') { Fog::AWS[:rds].describe_event_subscriptions('SubscriptionName' => @name).body['DescribeEventSubscriptionsResult']['EventSubscriptionsList'].first['Status'] }
      raises(Fog::AWS::RDS::NotFound) { Fog::AWS[:rds].describe_event_subscriptions('SubscriptionName' => @name) }

      body
    end
  end
end

Version data entries

63 entries across 61 versions & 3 rubygems

Version Path
fog-aws-3.12.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.11.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.10.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.9.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.8.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.7.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.6.7 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.6.6 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.6.5 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.6.4 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.6.3 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.6.2 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.5.2 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.5.1 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.5.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.4.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.3.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.2.0 tests/requests/rds/event_subscription_tests.rb
fog-aws-3.1.0 tests/requests/rds/event_subscription_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/tests/requests/rds/event_subscription_tests.rb