Sha256: 80b2eef32fcf4838a71dd2f570579d75cbc0e471fbf81f8c78cc66d2ce5f1500

Contents?: true

Size: 1.53 KB

Versions: 180

Compression:

Stored size: 1.53 KB

Contents

Shindo.tests('AWS::SimpleDB | domain requests', ['aws']) do

  @domain_metadata_format = AWS::SimpleDB::Formats::BASIC.merge({
    'AttributeNameCount'        => Integer,
    'AttributeNamesSizeBytes'   => Integer,
    'AttributeValueCount'       => Integer,
    'AttributeValuesSizeBytes'  => Integer,
    'ItemCount'                 => Integer,
    'ItemNamesSizeBytes'        => Integer,
    'Timestamp'                 => Time
  })

  @domain_name = "fog_domain_#{Time.now.to_f.to_s.gsub('.','')}"

  tests('success') do

    tests("#create_domain(#{@domain_name})").formats(AWS::SimpleDB::Formats::BASIC) do
      Fog::AWS[:simpledb].create_domain(@domain_name).body
    end

    tests("#create_domain(#{@domain_name})").succeeds do
      Fog::AWS[:simpledb].create_domain(@domain_name)
    end

    tests("#domain_metadata(#{@domain_name})").formats(@domain_metadata_format) do
      Fog::AWS[:simpledb].domain_metadata(@domain_name).body
    end

    tests("#list_domains").formats(AWS::SimpleDB::Formats::BASIC.merge('Domains' => [String])) do
      Fog::AWS[:simpledb].list_domains.body
    end

    tests("#delete_domain(#{@domain_name})").formats(AWS::SimpleDB::Formats::BASIC) do
      Fog::AWS[:simpledb].delete_domain(@domain_name).body
    end

    tests("#delete_domain(#{@domain_name})").succeeds do
      Fog::AWS[:simpledb].delete_domain(@domain_name)
    end

  end

  tests('failure') do

    tests("#domain_metadata('notadomain')").raises(Excon::Errors::BadRequest) do
      Fog::AWS[:simpledb].domain_metadata('notadomain')
    end

  end

end

Version data entries

180 entries across 178 versions & 22 rubygems

Version Path
fog-aws-0.9.0 tests/requests/simpledb/domain_tests.rb
fog-aws-0.8.1 tests/requests/simpledb/domain_tests.rb
fog-aws-0.8.0 tests/requests/simpledb/domain_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/tests/requests/simpledb/domain_tests.rb
fog-aws-0.7.6 tests/requests/simpledb/domain_tests.rb
fog-aws-0.7.5 tests/requests/simpledb/domain_tests.rb
fog-aws-0.7.4 tests/requests/simpledb/domain_tests.rb
fog-aws-0.7.3 tests/requests/simpledb/domain_tests.rb
fog-aws-0.7.2 tests/requests/simpledb/domain_tests.rb
fog-aws-0.6.0 tests/requests/simpledb/domain_tests.rb
fog-aws-0.5.0 tests/requests/simpledb/domain_tests.rb
fog-aws-0.4.1 tests/requests/simpledb/domain_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/aws/requests/simpledb/domain_tests.rb
fog-aws-0.4.0 tests/requests/simpledb/domain_tests.rb
fog-aws-0.3.0 tests/requests/simpledb/domain_tests.rb
fog-aws-0.2.2 tests/requests/simpledb/domain_tests.rb
fog-aws-0.2.0 tests/requests/simpledb/domain_tests.rb
fog-aws-0.1.2 tests/requests/simpledb/domain_tests.rb
fog-aws-0.1.1 tests/requests/simpledb/domain_tests.rb
fog-aws-0.1.0 tests/requests/simpledb/domain_tests.rb