From 9c9bcf5f9037d18f528cf1f7df8784eaf3037dbf Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Fri, 14 Dec 2018 13:56:29 +0000 Subject: [PATCH] Fix test failures for new dnspython module Release dnspython==1.16.0 has fixed a bug which didn't apply the zone default TTL to records without an explicit TTL. Since there doesn't seem to be a way to accomodate both the old and new behaviour in our tests, set an explicit TTL for all our sample records. Change-Id: I2d4cd55b69da696a9d4b25213969248a4c2e6119 --- .../resources/zonefiles/example.com.zone | 24 +++++++++---------- designate/tests/test_dnsutils.py | 8 +++++++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/designate/tests/resources/zonefiles/example.com.zone b/designate/tests/resources/zonefiles/example.com.zone index 06f076a72..7ec563634 100644 --- a/designate/tests/resources/zonefiles/example.com.zone +++ b/designate/tests/resources/zonefiles/example.com.zone @@ -7,15 +7,15 @@ example.com. 600 IN SOA ns1.example.com. nsadmin.example.com. ( 10800 ; minimum ) ipv4.example.com. 300 IN A 192.0.0.1 -ipv6.example.com. IN AAAA fd00::1 -cname.example.com. IN CNAME example.com. -example.com. IN MX 5 192.0.0.2 -example.com. IN MX 10 192.0.0.3 -_http._tcp.example.com. IN SRV 10 0 80 192.0.0.4 -_http._tcp.example.com. IN SRV 10 5 80 192.0.0.5 -example.com. IN TXT "abc" "def" -example.com. IN SPF "v=spf1 mx a" -example.com. IN NS ns1.example.com. -example.com. IN NS ns2.example.com. -delegation.example.com. IN NS ns1.example.com. -1.0.0.192.in-addr.arpa. IN PTR ipv4.example.com. +ipv6.example.com. 10800 IN AAAA fd00::1 +cname.example.com. 10800 IN CNAME example.com. +example.com. 10800 IN MX 5 192.0.0.2 +example.com. 10800 IN MX 10 192.0.0.3 +_http._tcp.example.com. 10800 IN SRV 10 0 80 192.0.0.4 +_http._tcp.example.com. 10800 IN SRV 10 5 80 192.0.0.5 +example.com. 10800 IN TXT "abc" "def" +example.com. 10800 IN SPF "v=spf1 mx a" +example.com. 10800 IN NS ns1.example.com. +example.com. 10800 IN NS ns2.example.com. +delegation.example.com. 10800 IN NS ns1.example.com. +1.0.0.192.in-addr.arpa. 10800 IN PTR ipv4.example.com. diff --git a/designate/tests/test_dnsutils.py b/designate/tests/test_dnsutils.py index d6205b693..21013787f 100644 --- a/designate/tests/test_dnsutils.py +++ b/designate/tests/test_dnsutils.py @@ -24,9 +24,11 @@ from designate.tests import TestCase SAMPLES = { ("cname.example.com.", "CNAME"): { + "ttl": 10800, "records": ["example.com."], }, ("_http._tcp.example.com.", "SRV"): { + "ttl": 10800, "records": [ "10 0 80 192.0.0.4.example.com.", "10 5 80 192.0.0.5.example.com." @@ -37,9 +39,11 @@ SAMPLES = { "records": ["192.0.0.1"] }, ("delegation.example.com.", "NS"): { + "ttl": 10800, "records": ["ns1.example.com."] }, ("ipv6.example.com.", "AAAA"): { + "ttl": 10800, "records": ["fd00::1"], }, ("example.com.", "SOA"): { @@ -50,18 +54,22 @@ SAMPLES = { "ttl": 600 }, ("example.com.", "MX"): { + "ttl": 10800, "records": [ "5 192.0.0.2.example.com.", '10 192.0.0.3.example.com.' ] }, ("example.com.", "TXT"): { + "ttl": 10800, "records": ['"abc" "def"'] }, ("example.com.", "SPF"): { + "ttl": 10800, "records": ['"v=spf1 mx a"'] }, ("example.com.", "NS"): { + "ttl": 10800, "records": [ 'ns1.example.com.', 'ns2.example.com.'