]> granicus.if.org Git - pdns/commitdiff
Add regression test for previous commit
authorRuben d'Arco <cyclops@prof-x.net>
Thu, 9 May 2013 18:43:40 +0000 (20:43 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 12 Jul 2013 15:26:19 +0000 (17:26 +0200)
regression-tests/1dyndns-update-delete-parent-delegate/command [new file with mode: 0755]
regression-tests/1dyndns-update-delete-parent-delegate/description [new file with mode: 0644]
regression-tests/1dyndns-update-delete-parent-delegate/expected_result [new file with mode: 0644]
regression-tests/1dyndns-update-delete-parent-delegate/expected_result.dnssec [new file with mode: 0644]
regression-tests/1dyndns-update-delete-parent-delegate/expected_result.narrow [new file with mode: 0644]
regression-tests/1dyndns-update-delete-parent-delegate/expected_result.nsec3 [new file with mode: 0644]
regression-tests/1dyndns-update-delete-parent-delegate/skip.nodyndns [new file with mode: 0644]

diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/command b/regression-tests/1dyndns-update-delete-parent-delegate/command
new file mode 100755 (executable)
index 0000000..9f71b75
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+mysqldiff
+
+cleannsupdate <<!
+server $nameserver $port
+zone test.dyndns
+update add a.b.c.delegate.test.dyndns. 3600 NS ns1.test.dyndns
+update add c.delegate.test.dyndns. 3600 NS ns1.test.dyndns
+send
+answer
+!
+
+mysqldiff 1 "Check if delegates are added."
+
+cleannsupdate <<!
+server $nameserver $port
+zone test.dyndns
+update delete c.delegate.test.dyndns.
+send
+answer
+!
+
+mysqldiff 2 "Check if c.delegate.test.dyndns. was removed correctly."
+
+
+cleannsupdate <<!
+server $nameserver $port
+zone test.dyndns
+update delete a.b.c.delegate.test.dyndns.
+send
+answer
+!
+
+mysqldiff 3 "Check if records are all removed"
diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/description b/regression-tests/1dyndns-update-delete-parent-delegate/description
new file mode 100644 (file)
index 0000000..bfc22f8
--- /dev/null
@@ -0,0 +1 @@
+This test performs a simple add and delete of an A-record using RFC2136.
diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/expected_result b/regression-tests/1dyndns-update-delete-parent-delegate/expected_result
new file mode 100644 (file)
index 0000000..d3e57b1
--- /dev/null
@@ -0,0 +1,34 @@
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if delegates are added.
+--- Start: diff start step.1 ---
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600
+> c.delegate.test.dyndns       NS      0       ns1.test.dyndns 3600
+--- End: diff start step.1 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if c.delegate.test.dyndns. was removed correctly.
+--- Start: diff start step.2 ---
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600
+--- End: diff start step.2 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if records are all removed
+--- Start: diff start step.3 ---
+no differnce
+--- End: diff start step.3 ---
+
diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/expected_result.dnssec b/regression-tests/1dyndns-update-delete-parent-delegate/expected_result.dnssec
new file mode 100644 (file)
index 0000000..bba0c5d
--- /dev/null
@@ -0,0 +1,34 @@
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if delegates are added.
+--- Start: diff start step.1 ---
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600    'delegate c b a'        0
+> c.delegate.test.dyndns       NS      0       ns1.test.dyndns 3600    'delegate c'    0
+--- End: diff start step.1 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if c.delegate.test.dyndns. was removed correctly.
+--- Start: diff start step.2 ---
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600    'delegate c b a'        0
+--- End: diff start step.2 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if records are all removed
+--- Start: diff start step.3 ---
+no differnce
+--- End: diff start step.3 ---
+
diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/expected_result.narrow b/regression-tests/1dyndns-update-delete-parent-delegate/expected_result.narrow
new file mode 100644 (file)
index 0000000..16e101b
--- /dev/null
@@ -0,0 +1,59 @@
+TODO: UPDATE!
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if delegates are added.
+--- Start: diff start step.1 ---
+< test.dyndns  MX      10      host-1.test.dyndns      3600    NULL    1
+< test.dyndns  MX      20      host-2.test.dyndns      3600    NULL    1
+< test.dyndns  NS      0       ns1.test.dyndns 3600    NULL    1
+< test.dyndns  NS      0       ns2.test.dyndns 3600    NULL    1
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600    NULL    0
+> c.delegate.test.dyndns       NS      0       ns1.test.dyndns 3600    NULL    0
+> test.dyndns  MX      10      host-1.test.dyndns      3600    ''      1
+> test.dyndns  MX      20      host-2.test.dyndns      3600    ''      1
+> test.dyndns  NS      0       ns1.test.dyndns 3600    ''      1
+> test.dyndns  NS      0       ns2.test.dyndns 3600    ''      1
+--- End: diff start step.1 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if c.delegate.test.dyndns. was removed correctly.
+--- Start: diff start step.2 ---
+< test.dyndns  MX      10      host-1.test.dyndns      3600    NULL    1
+< test.dyndns  MX      20      host-2.test.dyndns      3600    NULL    1
+< test.dyndns  NS      0       ns1.test.dyndns 3600    NULL    1
+< test.dyndns  NS      0       ns2.test.dyndns 3600    NULL    1
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600    NULL    0
+> test.dyndns  MX      10      host-1.test.dyndns      3600    ''      1
+> test.dyndns  MX      20      host-2.test.dyndns      3600    ''      1
+> test.dyndns  NS      0       ns1.test.dyndns 3600    ''      1
+> test.dyndns  NS      0       ns2.test.dyndns 3600    ''      1
+--- End: diff start step.2 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if records are all removed
+--- Start: diff start step.3 ---
+< test.dyndns  MX      10      host-1.test.dyndns      3600    NULL    1
+< test.dyndns  MX      20      host-2.test.dyndns      3600    NULL    1
+< test.dyndns  NS      0       ns1.test.dyndns 3600    NULL    1
+< test.dyndns  NS      0       ns2.test.dyndns 3600    NULL    1
+> test.dyndns  MX      10      host-1.test.dyndns      3600    ''      1
+> test.dyndns  MX      20      host-2.test.dyndns      3600    ''      1
+> test.dyndns  NS      0       ns1.test.dyndns 3600    ''      1
+> test.dyndns  NS      0       ns2.test.dyndns 3600    ''      1
+--- End: diff start step.3 ---
+
diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/expected_result.nsec3 b/regression-tests/1dyndns-update-delete-parent-delegate/expected_result.nsec3
new file mode 100644 (file)
index 0000000..79abda9
--- /dev/null
@@ -0,0 +1,34 @@
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if delegates are added.
+--- Start: diff start step.1 ---
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600    NULL    0
+> c.delegate.test.dyndns       NS      0       ns1.test.dyndns 3600    NULL    0
+--- End: diff start step.1 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if c.delegate.test.dyndns. was removed correctly.
+--- Start: diff start step.2 ---
+> a.b.c.delegate.test.dyndns   NS      0       ns1.test.dyndns 3600    NULL    0
+--- End: diff start step.2 ---
+
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns.                  IN      SOA
+
+Check if records are all removed
+--- Start: diff start step.3 ---
+no differnce
+--- End: diff start step.3 ---
+
diff --git a/regression-tests/1dyndns-update-delete-parent-delegate/skip.nodyndns b/regression-tests/1dyndns-update-delete-parent-delegate/skip.nodyndns
new file mode 100644 (file)
index 0000000..81c071b
--- /dev/null
@@ -0,0 +1 @@
+Skip this test if the backend does not support dyndns/rfc2136