Sha256: e6f16b334c7cdb6fc9b28f0fb96981f1121c7a4cb8365db33ae58ef465da22bc

Contents?: true

Size: 1.46 KB

Versions: 24

Compression:

Stored size: 1.46 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
      AWS[:sdb].create_domain(@domain_name).body
    end

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

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

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

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

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

  end

  tests('failure') do

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

  end

end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/tests/aws/requests/simpledb/domain_tests.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/tests/aws/requests/simpledb/domain_tests.rb
fog-0.11.0 tests/aws/requests/simpledb/domain_tests.rb
fog-0.10.0 tests/aws/requests/simpledb/domain_tests.rb
fog4encbs-0.9.0.1 tests/aws/requests/simpledb/domain_tests.rb
fog4encbs-0.9.0 tests/aws/requests/simpledb/domain_tests.rb
fog-0.9.0 tests/aws/requests/simpledb/domain_tests.rb
fog-0.8.2 tests/aws/requests/simpledb/domain_tests.rb
fog-0.8.1 tests/aws/requests/simpledb/domain_tests.rb
fog-0.8.0 tests/aws/requests/simpledb/domain_tests.rb
fog-0.7.2 tests/aws/requests/simpledb/domain_tests.rb
fog-0.7.1 tests/aws/requests/simpledb/domain_tests.rb
fog-0.7.0 tests/aws/requests/simpledb/domain_tests.rb
fog-0.6.0 tests/aws/requests/simpledb/domain_tests.rb
fog-0.5.3 tests/aws/requests/simpledb/domain_tests.rb
fog-0.5.2 tests/aws/requests/simpledb/domain_tests.rb
fog-0.5.1 tests/aws/requests/simpledb/domain_tests.rb
fog-0.5.0 tests/aws/requests/simpledb/domain_tests.rb
phpfog-fog-0.4.1.3 tests/aws/requests/simpledb/domain_tests.rb
phpfog-fog-0.4.1.2 tests/aws/requests/simpledb/domain_tests.rb