Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Knot DNS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
23
Issues
23
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Knot projects
Knot DNS
Commits
d8e67890
Commit
d8e67890
authored
Apr 04, 2014
by
Lubos Slovak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tests-extra] Fixed TODOs + added one ddns test
parent
89ca3109
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
tests-extra/tests/ddns/basic/test.py
tests-extra/tests/ddns/basic/test.py
+17
-5
No files found.
tests-extra/tests/ddns/basic/test.py
View file @
d8e67890
...
...
@@ -143,8 +143,8 @@ def do_normal_tests(master, zone, dnssec=False):
resp
=
master
.
dig
(
"rrtest2.ddns."
,
"ANY"
)
resp
.
check
(
rcode
=
"NOERROR"
)
resp
.
check_record
(
rtype
=
"MX"
,
rdata
=
"10 something.ddns."
)
# TODO: don't know how to do check: "no CNAME in response"
resp
.
check_record
(
rtype
=
"CNAME"
,
nordata
=
"ignore.me.ddns.
"
)
resp
=
master
.
dig
(
"rrtest2.ddns."
,
"CNAME"
)
compare
(
resp
.
count
(
section
=
"answer"
),
0
,
"Added CNAME when it shouldn't
"
)
verify
(
master
,
zone
,
dnssec
)
# add A to CNAME node, should be ignored
...
...
@@ -168,8 +168,7 @@ def do_normal_tests(master, zone, dnssec=False):
resp
=
master
.
dig
(
"rrtest3.ddns."
,
"ANY"
)
resp
.
check
(
rcode
=
"NOERROR"
)
resp
.
check_record
(
rtype
=
"CNAME"
,
rdata
=
"dont.ignore.me.ddns."
)
# TODO: don't know how to do check: "no other RR in response"
resp
.
check_record
(
rtype
=
"TXT"
,
nordata
=
"ignore"
)
compare
(
resp
.
count
(
section
=
"answer"
),
1
,
"Other RRs than CNAME in node"
)
verify
(
master
,
zone
,
dnssec
)
# add CNAME to CNAME node, should be replaced
...
...
@@ -219,6 +218,19 @@ def do_normal_tests(master, zone, dnssec=False):
rdata
=
"dns1.ddns. hostmaster.ddns. 2012111213 10800 3600 1209600 7200"
)
verify
(
master
,
zone
,
dnssec
)
# add SOA with higher serial + remove all SOA in the same UPDATE
# the removal should be ignored, only replacing the SOA
check_log
(
"Newer SOA addition + removal of all SOA"
)
up
=
master
.
update
(
zone
)
up
.
add
(
"ddns."
,
3600
,
"SOA"
,
"dns1.ddns. hostmaster.ddns. 2013111213 10800 3600 1209600 7200"
)
up
.
delete
(
"ddns."
,
"SOA"
)
up
.
send
(
"NOERROR"
)
resp
=
master
.
dig
(
"ddns."
,
"SOA"
)
resp
.
check
(
rcode
=
"NOERROR"
)
resp
.
check_record
(
rtype
=
"SOA"
,
rdata
=
"dns1.ddns. hostmaster.ddns. 2013111213 10800 3600 1209600 7200"
)
verify
(
master
,
zone
,
dnssec
)
# add SOA with lower serial, should be ignored
check_log
(
"Older SOA addition"
)
up
=
master
.
update
(
zone
)
...
...
@@ -226,7 +238,7 @@ def do_normal_tests(master, zone, dnssec=False):
"dns1.ddns. hostmaster.ddns. 2010111213 10800 3600 1209600 7200"
)
resp
=
master
.
dig
(
"ddns."
,
"SOA"
)
resp
.
check
(
rcode
=
"NOERROR"
,
rdata
=
"dns1.ddns. hostmaster.ddns. 201
2
111213 10800 3600 1209600 7200"
)
rdata
=
"dns1.ddns. hostmaster.ddns. 201
4
111213 10800 3600 1209600 7200"
)
verify
(
master
,
zone
,
dnssec
)
# add and remove the same record
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment