Sha256: e0444adbc4a65b2c0f40ee7e2f2b786c8b4e970d3d5a8063759e0e32bcd4b4fb

Contents?: true

Size: 1.37 KB

Versions: 13

Compression:

Stored size: 1.37 KB

Contents

Shindo.tests('AWS::Glacier | glacier vault requests', ['aws']) do
  pending if Fog.mocking?

  topic_arn = Fog::AWS[:sns].create_topic( 'fog_test_glacier_topic').body['TopicArn']
  Fog::AWS[:glacier].create_vault('Fog-Test-Vault')

  tests('list_vaults') do
    returns(true){Fog::AWS[:glacier].list_vaults.body['VaultList'].collect {|data| data['VaultName']}.include?('Fog-Test-Vault')}
  end

  tests('describe_vault') do
    returns('Fog-Test-Vault'){Fog::AWS[:glacier].describe_vault('Fog-Test-Vault').body['VaultName']}
  end

  tests('set_vault_notification_configuration') do
    Fog::AWS[:glacier].set_vault_notification_configuration 'Fog-Test-Vault', topic_arn, ['ArchiveRetrievalCompleted']
  end

  tests('get_vault_notification_configuration') do
    returns('SNSTopic' => topic_arn, 'Events' => ['ArchiveRetrievalCompleted']){ Fog::AWS[:glacier].get_vault_notification_configuration( 'Fog-Test-Vault').body}
  end

  tests('delete_vault_notification_configuration') do
    Fog::AWS[:glacier].delete_vault_notification_configuration( 'Fog-Test-Vault')
    raises(Excon::Errors::NotFound){Fog::AWS[:glacier].get_vault_notification_configuration( 'Fog-Test-Vault')}
  end

  tests('delete_vault') do
    Fog::AWS[:glacier].delete_vault( 'Fog-Test-Vault')
    raises(Excon::Errors::NotFound){Fog::AWS[:glacier].describe_vault( 'Fog-Test-Vault')}
  end

  Fog::AWS[:sns].delete_topic topic_arn

end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
fog-nirvanix-1.8.2 tests/aws/requests/glacier/vault_tests.rb
fog-nirvanix-1.8.1 tests/aws/requests/glacier/vault_tests.rb
fog-parser-fix-1.6.1 tests/aws/requests/glacier/vault_tests.rb
fog-test-again-1.6.0 tests/aws/requests/glacier/vault_tests.rb
fog-parser-fix-1.6.0 tests/aws/requests/glacier/vault_tests.rb
fog-maestrodev-1.8.0.20130114204828 tests/aws/requests/glacier/vault_tests.rb
fog-maestrodev-1.8.0.20130111070250 tests/aws/requests/glacier/vault_tests.rb
fog-maestrodev-1.8.0.20130109172219 tests/aws/requests/glacier/vault_tests.rb
fog-sgonyea-1.8.1 tests/aws/requests/glacier/vault_tests.rb
fog-1.8.0 tests/aws/requests/glacier/vault_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/aws/requests/glacier/vault_tests.rb
fog-1.7.0 tests/aws/requests/glacier/vault_tests.rb
fog-1.6.0 tests/aws/requests/glacier/vault_tests.rb