Sha256: a7df346e4be54faf8b9093b60fbe0774eb9a4f1cb54935521960fe52099101c3

Contents?: true

Size: 1.48 KB

Versions: 75

Compression:

Stored size: 1.48 KB

Contents

Shindo.tests('AWS::Glacier | models', ['aws', 'glacier']) do
  pending if Fog.mocking?
  tests('success') do
    tests('vaults') do
      tests('getting a missing vault') do
        returns(nil) { Fog::AWS[:glacier].vaults.get('no-such-vault') }
      end

      vault = nil
      tests('creating a vault') do
        vault = Fog::AWS[:glacier].vaults.create :id => 'Fog-Test-Vault'
        tests("id is Fog-Test-Vault").returns('Fog-Test-Vault') {vault.id}
      end

      tests('all') do
        tests('contains vault').returns(true) { Fog::AWS[:glacier].vaults.collect {|vault| vault.id}.include?(vault.id)}
      end

      tests('destroy') do
        vault.destroy
        tests('removes vault').returns(nil) {Fog::AWS[:glacier].vaults.get(vault.id)}
      end
    end

    tests("archives") do
      vault = Fog::AWS[:glacier].vaults.create :id => 'Fog-Test-Vault-upload'
      tests('create') do
        archive = vault.archives.create(:body => 'data')
        tests('sets id').returns(true) {!archive.id.nil?}
        archive.destroy
      end
      tests('create multipart') do
        body = StringIO.new('x'*1024*1024*2)
        body.rewind
        archive = vault.archives.create(:body => body, :multipart_chunk_size => 1024*1024)
        tests('sets id').returns(true) {!archive.id.nil?}
        archive.destroy
      end
    end

    vault = Fog::AWS[:glacier].vaults.create :id => 'Fog-Test-Vault'
    tests("jobs") do
      tests('all').returns([]) {vault.jobs}
    end
    vault.destroy
  end
end

Version data entries

75 entries across 75 versions & 10 rubygems

Version Path
fog-maestrodev-1.18.0.20131209090811 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131126122111 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131125111730 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131125083406 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131123105121 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131122203507 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131121075022 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/aws/models/glacier/model_tests.rb
gapinc-fog-1.12.1.2.1 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/aws/models/glacier/model_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/aws/models/glacier/model_tests.rb
fog-1.18.0 tests/aws/models/glacier/model_tests.rb
fog-1.17.0 tests/aws/models/glacier/model_tests.rb
fog-1.16.0 tests/aws/models/glacier/model_tests.rb