frontend: skip network related tests when unavailable

Fix #46
This commit is contained in:
Lan Tian
2022-01-09 00:10:06 -06:00
parent af5b653326
commit a4e0f4c193
3 changed files with 36 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ import (
)
func TestGetASNRepresentationDNS(t *testing.T) {
checkNetwork(t)
setting.dnsInterface = "asn.cymru.com"
setting.whoisServer = ""
result := getASNRepresentation("6939")
@@ -15,6 +17,8 @@ func TestGetASNRepresentationDNS(t *testing.T) {
}
func TestGetASNRepresentationWhois(t *testing.T) {
checkNetwork(t)
setting.dnsInterface = ""
setting.whoisServer = "whois.arin.net"
result := getASNRepresentation("6939")