Skip TestLookup test when networking is disabled (#49)

This commit is contained in:
Charlotte 2025-03-21 15:43:10 +01:00 committed by GitHub
parent f730326814
commit d93adbc111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@ package dnsbl
import (
"fmt"
"net"
"os"
"testing"
)
@ -46,6 +47,11 @@ func TestReverse6(t *testing.T) {
}
func TestLookup(t *testing.T) {
if os.Getenv("DONT_USE_NETWORK") != "" {
t.Skip("test requires network egress")
return
}
resp, err := Lookup("27.65.243.194")
if err != nil {
t.Fatalf("it broked: %v", err)