Sha256: db3b9dc932997eee2fe1182dc3bc3f321612a115b9552f45f4a69b996d9c8ec3

Contents?: true

Size: 1.05 KB

Versions: 34

Compression:

Stored size: 1.05 KB

Contents

Shindo.tests("Fog::DNS[:aws] | records", ['aws', 'dns']) do

  tests("zones#create").succeeds do
    @zone = Fog::DNS[:aws].zones.create(:domain => generate_unique_domain)
  end

  param_groups = [
    # A record
    { :name => @zone.domain, :type => 'A', :ttl => 3600, :value => ['1.2.3.4'] },
    # CNAME record
    { :name => "www.#{@zone.domain}", :type => "CNAME", :ttl => 300, :value => @zone.domain}
  ]

  param_groups.each do |params|
    collection_tests(@zone.records, params)
  end

  records = []

  100.times do |i|
    records << @zone.records.create(:name => "#{i}.#{@zone.domain}", :type => "A", :ttl => 3600, :value => ['1.2.3.4'])
  end

  records << @zone.records.create(:name => "*.#{@zone.domain}", :type => "A", :ttl => 3600, :value => ['1.2.3.4'])

  tests("#all!").returns(101) do
    @zone.records.all!.size
  end

  tests("#all wildcard parsing").returns(true) do
    @zone.records.map(&:name).include?("*.#{@zone.domain}")
  end

  records.each do |record|
    record.destroy
  end

  tests("zones#destroy").succeeds do
    @zone.destroy
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
fog-1.22.0 tests/aws/models/dns/records_tests.rb
fog-1.21.0 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/aws/models/dns/records_tests.rb
fog-1.20.0 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/aws/models/dns/records_tests.rb
fog-1.19.0 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/aws/models/dns/records_tests.rb