mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
js_test.go should generate & test zonefile output too (#986)
* js_test.go: Do a zonefile test if $TESTNAME/parse_tests/{zonefile} exists.
* Add parse_tests zone files for all the tests that make sense.
* js_test.go: Addd the test datafile when displaying failures.
* 007-importTransformTTL.js: Was referring to a non-existent domain.
* 012-duration.js: Had duplicate DNS records.
* 029-dextendsub.js: Move CF-related tests to separate test.
* validate.go: Report non-existent domains as an error.
* cloudflareProvider.go: newCloudflare should not talk to the API.
This commit is contained in:
5
pkg/js/parse_tests/029-dextendsub/bar.foo.help.zone
Normal file
5
pkg/js/parse_tests/029-dextendsub/bar.foo.help.zone
Normal file
@@ -0,0 +1,5 @@
|
||||
$TTL 300
|
||||
@ IN A 50.13.13.13
|
||||
www IN A 50.14.14.14
|
||||
zip IN A 50.15.15.15
|
||||
www.zip IN A 50.16.16.16
|
||||
4
pkg/js/parse_tests/029-dextendsub/bar.foo.tld.zone
Normal file
4
pkg/js/parse_tests/029-dextendsub/bar.foo.tld.zone
Normal file
@@ -0,0 +1,4 @@
|
||||
$TTL 300
|
||||
@ IN A 30.7.7.7
|
||||
a IN A 30.9.9.9
|
||||
www IN A 30.8.8.8
|
||||
5
pkg/js/parse_tests/029-dextendsub/example.tld.zone
Normal file
5
pkg/js/parse_tests/029-dextendsub/example.tld.zone
Normal file
@@ -0,0 +1,5 @@
|
||||
$TTL 300
|
||||
a.sub IN CNAME b.sub.example.tld.
|
||||
b.sub IN CNAME sub.example.tld.
|
||||
c.sub IN CNAME sub.example.tld.
|
||||
e.sub IN CNAME otherdomain.tld.
|
||||
5
pkg/js/parse_tests/029-dextendsub/foo.help.zone
Normal file
5
pkg/js/parse_tests/029-dextendsub/foo.help.zone
Normal file
@@ -0,0 +1,5 @@
|
||||
$TTL 300
|
||||
@ IN A 40.12.12.12
|
||||
morty IN A 40.17.17.17
|
||||
www.morty IN A 40.18.18.18
|
||||
www IN A 40.12.12.12
|
||||
7
pkg/js/parse_tests/029-dextendsub/foo.here.zone
Normal file
7
pkg/js/parse_tests/029-dextendsub/foo.here.zone
Normal file
@@ -0,0 +1,7 @@
|
||||
$TTL 300
|
||||
@ IN A 60.19.19.19
|
||||
bar IN A 60.21.21.21
|
||||
baz.bar IN A 60.23.23.23
|
||||
www.baz.bar IN A 60.24.24.24
|
||||
www.bar IN A 60.22.22.22
|
||||
www IN A 60.20.20.20
|
||||
7
pkg/js/parse_tests/029-dextendsub/foo.net.zone
Normal file
7
pkg/js/parse_tests/029-dextendsub/foo.net.zone
Normal file
@@ -0,0 +1,7 @@
|
||||
$TTL 300
|
||||
@ IN A 10.1.1.1
|
||||
bar IN A 10.3.3.3
|
||||
www.bar IN A 10.4.4.4
|
||||
a.long.path.of.sub.domains IN A 10.25.25.25
|
||||
www.a.long.path.of.sub.domains IN A 10.26.26.26
|
||||
www IN A 10.2.2.2
|
||||
4
pkg/js/parse_tests/029-dextendsub/foo.tld.zone
Normal file
4
pkg/js/parse_tests/029-dextendsub/foo.tld.zone
Normal file
@@ -0,0 +1,4 @@
|
||||
$TTL 300
|
||||
@ IN A 20.5.5.5
|
||||
a IN A 20.10.10.10
|
||||
www IN A 20.6.6.6
|
||||
Reference in New Issue
Block a user