Sha256: 0137934fdbb9bdb83440aa71e0ec12eec71890c626434fb95fe7b466f313e6ff

Contents?: true

Size: 1.15 KB

Versions: 41

Compression:

Stored size: 1.15 KB

Contents

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

  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, false)
  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(103) do
    @zone.records.all!.size
  end

  tests("#all!").returns(103) 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

41 entries across 41 versions & 10 rubygems

Version Path
gapinc-fog-1.12.1.2.1 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/aws/models/dns/records_tests.rb
fog-1.18.0 tests/aws/models/dns/records_tests.rb
fog-1.17.0 tests/aws/models/dns/records_tests.rb
fog-1.16.0 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.15.0.20130927082724 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.15.0.20130829165835 tests/aws/models/dns/records_tests.rb
fog-1.15.0 tests/aws/models/dns/records_tests.rb
gapinc-fog-1.14.0 tests/aws/models/dns/records_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/aws/models/dns/records_tests.rb
fog-1.14.0 tests/aws/models/dns/records_tests.rb
fog-1.13.0 tests/aws/models/dns/records_tests.rb
gapinc-fog-1.12.1.2 tests/aws/models/dns/records_tests.rb
gapinc-fog-1.12.1.1 tests/aws/models/dns/records_tests.rb
gapinc-fog-1.12.1a tests/aws/models/dns/records_tests.rb
gapinc-fog-1.12.1 tests/aws/models/dns/records_tests.rb
fog-1.12.1 tests/aws/models/dns/records_tests.rb
fog-1.12.0 tests/aws/models/dns/records_tests.rb
hpfog-0.0.20 tests/aws/models/dns/records_tests.rb