Skip to content

Commit b40a366

Browse files
author
wafuwafu13
committed
use root server for test instead of example.com
1 parent 055fb3c commit b40a366

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

check-dns/lib/check_dns_test.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,84 +29,84 @@ func TestCheckDns(t *testing.T) {
2929
want_msg []string
3030
}{
3131
{
32-
[]string{"-H", "example.com"},
32+
[]string{"-H", "a.root-servers.net"},
3333
checkers.OK,
3434
[]string{"status: NOERROR"},
3535
},
3636
{
37-
[]string{"-H", "example.com", "--norec"},
37+
[]string{"-H", "a.root-servers.net", "--norec"},
3838
checkers.OK,
3939
[]string{"status: NOERROR"},
4040
},
4141
{
42-
[]string{"-H", "exampleeeee.com"},
42+
[]string{"-H", "a.root-servers.invalid"},
4343
checkers.CRITICAL,
4444
[]string{"status: NXDOMAIN"},
4545
},
4646
{
47-
[]string{"-H", "example.com", "-s", "8.8.8.8"},
47+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8"},
4848
checkers.OK,
4949
[]string{"status: NOERROR"},
5050
},
5151
{
52-
[]string{"-H", "exampleeeee.com", "-s", "8.8.8.8"},
52+
[]string{"-H", "a.root-servers.invalid", "-s", "8.8.8.8"},
5353
checkers.CRITICAL,
5454
[]string{"status: NXDOMAIN"},
5555
},
5656
{
57-
[]string{"-H", "example.com", "-s", "8.8.8"},
57+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8"},
5858
checkers.CRITICAL,
5959
[]string{""},
6060
},
6161
{
62-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-q", "AAAA"},
62+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-q", "AAAA"},
6363
checkers.OK,
6464
[]string{"status: NOERROR", "AAAA"},
6565
},
6666
{
67-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-q", "AAA"},
67+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-q", "AAA"},
6868
checkers.CRITICAL,
6969
[]string{"AAA is invalid queryType"},
7070
},
7171
{
72-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-c", "IN"},
72+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-c", "IN"},
7373
checkers.OK,
7474
[]string{"status: NOERROR"},
7575
},
7676
{
77-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-c", "INN"},
77+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-c", "INN"},
7878
checkers.CRITICAL,
7979
[]string{"INN is invalid queryClass"},
8080
},
8181
{
82-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-a", "93.184.216.34"},
82+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-a", "198.41.0.4"},
8383
checkers.OK,
84-
[]string{"status: NOERROR", "93.184.216.34"},
84+
[]string{"status: NOERROR", "198.41.0.4"},
8585
},
8686
{
87-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-q", "AAAA", "--expected-address", "2606:2800:220:1"},
87+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-q", "AAAA", "--expected-address", "2001:503:ba3e::2:30"},
8888
checkers.OK,
89-
[]string{"status: NOERROR", "2606:2800:220:1"},
89+
[]string{"status: NOERROR", "2001:503:ba3e::2:30"},
9090
},
9191
{
92-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-a", "93.184.216.33"},
92+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-a", "198.41.0.3"},
9393
checkers.CRITICAL,
94-
[]string{"status: NOERROR", "93.184.216.34"},
94+
[]string{"status: NOERROR", "198.41.0.4"},
9595
},
9696
{
97-
[]string{"-H", "exampleeeee.com", "-s", "8.8.8.8", "-a", "93.184.216.34"},
97+
[]string{"-H", "a.root-servers.invalid", "-s", "8.8.8.8", "-a", "198.41.0.4"},
9898
checkers.CRITICAL,
9999
[]string{"status: NXDOMAIN"},
100100
},
101101
{
102-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-a", "93.184.216.33,93.184.216.34"},
102+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-a", "198.41.0.3,198.41.0.4"},
103103
checkers.WARNING,
104-
[]string{"status: NOERROR", "93.184.216.34"},
104+
[]string{"status: NOERROR", "198.41.0.4"},
105105
},
106106
{
107-
[]string{"-H", "example.com", "-s", "8.8.8.8", "-a", "93.184.216.33, 93.184.216.34"},
107+
[]string{"-H", "a.root-servers.net", "-s", "8.8.8.8", "-a", "198.41.0.3, 198.41.0.4"},
108108
checkers.WARNING,
109-
[]string{"status: NOERROR", "93.184.216.34"},
109+
[]string{"status: NOERROR", "198.41.0.4"},
110110
},
111111
}
112112

0 commit comments

Comments
 (0)