We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e612da commit d4a5910Copy full SHA for d4a5910
glow_test.go
@@ -2,7 +2,8 @@ package main
2
3
import (
4
"bytes"
5
- "strings"
+ "errors"
6
+ "net"
7
"testing"
8
)
9
@@ -19,7 +20,8 @@ func TestGlowSources(t *testing.T) {
19
20
t.Run(v, func(t *testing.T) {
21
// Start by checking for network issues.
22
_, nerr := readmeURL(v)
- if nerr != nil && strings.Contains(nerr.Error(), "no such host") {
23
+ var dnsErr *net.DNSError
24
+ if nerr != nil && errors.As(nerr, &dnsErr) {
25
t.Logf("Error during execution (args: %s):\n%v", v, nerr)
26
t.Skip("Test uses network. Are you connected to the Internet?")
27
}
0 commit comments