@@ -29,84 +29,84 @@ func TestCheckDns(t *testing.T) {
29
29
want_msg []string
30
30
}{
31
31
{
32
- []string {"-H" , "example.com " },
32
+ []string {"-H" , "a.root-servers.net " },
33
33
checkers .OK ,
34
34
[]string {"status: NOERROR" },
35
35
},
36
36
{
37
- []string {"-H" , "example.com " , "--norec" },
37
+ []string {"-H" , "a.root-servers.net " , "--norec" },
38
38
checkers .OK ,
39
39
[]string {"status: NOERROR" },
40
40
},
41
41
{
42
- []string {"-H" , "exampleeeee.com " },
42
+ []string {"-H" , "a.root-servers.invalid " },
43
43
checkers .CRITICAL ,
44
44
[]string {"status: NXDOMAIN" },
45
45
},
46
46
{
47
- []string {"-H" , "example.com " , "-s" , "8.8.8.8" },
47
+ []string {"-H" , "a.root-servers.net " , "-s" , "8.8.8.8" },
48
48
checkers .OK ,
49
49
[]string {"status: NOERROR" },
50
50
},
51
51
{
52
- []string {"-H" , "exampleeeee.com " , "-s" , "8.8.8.8" },
52
+ []string {"-H" , "a.root-servers.invalid " , "-s" , "8.8.8.8" },
53
53
checkers .CRITICAL ,
54
54
[]string {"status: NXDOMAIN" },
55
55
},
56
56
{
57
- []string {"-H" , "example.com " , "-s" , "8.8.8" },
57
+ []string {"-H" , "a.root-servers.net " , "-s" , "8.8.8" },
58
58
checkers .CRITICAL ,
59
59
[]string {"" },
60
60
},
61
61
{
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" },
63
63
checkers .OK ,
64
64
[]string {"status: NOERROR" , "AAAA" },
65
65
},
66
66
{
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" },
68
68
checkers .CRITICAL ,
69
69
[]string {"AAA is invalid queryType" },
70
70
},
71
71
{
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" },
73
73
checkers .OK ,
74
74
[]string {"status: NOERROR" },
75
75
},
76
76
{
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" },
78
78
checkers .CRITICAL ,
79
79
[]string {"INN is invalid queryClass" },
80
80
},
81
81
{
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 " },
83
83
checkers .OK ,
84
- []string {"status: NOERROR" , "93.184.216.34 " },
84
+ []string {"status: NOERROR" , "198.41.0.4 " },
85
85
},
86
86
{
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 " },
88
88
checkers .OK ,
89
- []string {"status: NOERROR" , "2606:2800:220:1 " },
89
+ []string {"status: NOERROR" , "2001:503:ba3e::2:30 " },
90
90
},
91
91
{
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 " },
93
93
checkers .CRITICAL ,
94
- []string {"status: NOERROR" , "93.184.216.34 " },
94
+ []string {"status: NOERROR" , "198.41.0.4 " },
95
95
},
96
96
{
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 " },
98
98
checkers .CRITICAL ,
99
99
[]string {"status: NXDOMAIN" },
100
100
},
101
101
{
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 " },
103
103
checkers .WARNING ,
104
- []string {"status: NOERROR" , "93.184.216.34 " },
104
+ []string {"status: NOERROR" , "198.41.0.4 " },
105
105
},
106
106
{
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 " },
108
108
checkers .WARNING ,
109
- []string {"status: NOERROR" , "93.184.216.34 " },
109
+ []string {"status: NOERROR" , "198.41.0.4 " },
110
110
},
111
111
}
112
112
0 commit comments