Sha256: 17e4b07bc5afd223b9424cccf40b2a217b0ea89db313b45cd93003f687da5e80

Contents?: true

Size: 1.1 KB

Versions: 18

Compression:

Stored size: 1.1 KB

Contents

Shindo.tests('Fog::DNS[:aws] | change_resource_record_sets', ['aws', 'dns']) do
  tests('success') do
    test('#elb_hosted_zone_mapping from DNS name') do
      zone_id = Fog::AWS::DNS.hosted_zone_for_alias_target('arbitrary-sub-domain.eu-west-1.elb.amazonaws.com')
      zone_id == Fog::AWS::DNS.elb_hosted_zone_mapping['eu-west-1']
    end
  end

  tests("#change_resource_record_sets_data formats geolocation properly") do
    change_batch = [{
        :action=>"CREATE",
        :name=>"ark.m.example.net.",
        :resource_records=>["1.1.1.1"],
        :ttl=>"300",
        :type=>"A",
        :set_identifier=>"ark",
        :geo_location=>{"CountryCode"=>"US", "SubdivisionCode"=>"AR"},
        }]

    version = '2013-04-01'
    result = Fog::AWS::DNS.change_resource_record_sets_data('zone_id123', change_batch, version)
    doc = Nokogiri::XML(result)

    returns("https://route53.amazonaws.com/doc/#{version}/") { doc.namespaces['xmlns'] }
    returns(%w[US AR]) {
      [
        doc.css("GeoLocation CountryCode").text,
        doc.css("GeoLocation SubdivisionCode").text
      ]
    }

    result
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
fog-aws-3.12.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.11.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.10.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.9.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.8.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.7.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.6.7 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.6.6 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.6.5 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.6.4 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.6.3 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.6.2 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.5.2 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.5.1 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.5.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.4.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.3.0 tests/requests/dns/change_resource_record_sets_tests.rb
fog-aws-3.2.0 tests/requests/dns/change_resource_record_sets_tests.rb