add some test ideas
This commit is contained in:
parent
bc5c003901
commit
d32dba2a75
44
TESTS.md
44
TESTS.md
|
@ -24,3 +24,47 @@ Send malformed packets (both as queries and as answers):
|
||||||
|
|
||||||
Test that ANY queries return records of all types matching the domain
|
Test that ANY queries return records of all types matching the domain
|
||||||
Test that A queries only return A records, not others matching the domain
|
Test that A queries only return A records, not others matching the domain
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
# Sample Data:
|
||||||
|
# no A records for delegated.daplie.me
|
||||||
|
# two external NS records for delegted.daplie.me
|
||||||
|
# zone daplie.me exists
|
||||||
|
|
||||||
|
# Test:
|
||||||
|
# should return NS records in AUTHORITY section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 A delegated.daplie.me
|
||||||
|
|
||||||
|
# should return NS records in ANSWER section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 NS delegated.daplie.me
|
||||||
|
|
||||||
|
|
||||||
|
# Sample Data:
|
||||||
|
# two A records for daplie.me
|
||||||
|
# no NS records
|
||||||
|
|
||||||
|
# Test:
|
||||||
|
# should return A records in ANSWER section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 A daplie.me
|
||||||
|
|
||||||
|
# should return SOA records in AUTHORITY section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 A doesntexist.daplie.me
|
||||||
|
node bin/dig.js @localhost -p 65053 NS doesntexist.daplie.me
|
||||||
|
|
||||||
|
|
||||||
|
# Sample Data:
|
||||||
|
# two A records for a.daplie.me
|
||||||
|
# has **internal** NS records
|
||||||
|
|
||||||
|
# Test:
|
||||||
|
# should return A record in ANSWER section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 A a.daplie.me
|
||||||
|
|
||||||
|
# should return SOA record in AUTHORITY section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 A doesntexist.a.daplie.me
|
||||||
|
|
||||||
|
# should return NS records in ANSWER section, nothing else
|
||||||
|
node bin/dig.js @localhost -p 65053 NS a.daplie.me
|
||||||
|
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue