Skip to content

Commit 35ca722

Browse files
committed
added test breaks for unavailable dns
develpoment environment is behind firewall rules that prohibit dns access to public servers. -short flag skips tests that require external dns resolver.
1 parent 27a3bd6 commit 35ca722

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.vscode/tasks.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"label": "Go Coverage",
66
"type": "shell",
7-
"command": "go test -coverprofile='coverage.out'",
7+
"command": "go test -short -coverprofile='coverage.out'",
88
"options": {
99
"env": {
1010
"CGO_ENABLED": "0"

action_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func TestActionWildcardDNSMasq(t *testing.T) {
157157
}
158158

159159
func TestListResolver(t *testing.T) {
160+
if testing.Short() {
161+
t.Skip("skipping listresolver test; dns firewalling will cause this to fail")
162+
}
160163
http.DefaultTransport = nil
161164
corefile := `filter {
162165
listresolver 9.9.9.9
@@ -170,6 +173,9 @@ func TestListResolver(t *testing.T) {
170173
}
171174

172175
func TestListResolverTLS(t *testing.T) {
176+
if testing.Short() {
177+
t.Skip("skipping listresolver test; dns firewalling will cause this to fail")
178+
}
173179
http.DefaultTransport = nil
174180
corefile := `filter {
175181
listresolver tls://9.9.9.9 dns.quad9.net

0 commit comments

Comments
 (0)