1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

update test case

This commit is contained in:
Timothy 2020-05-03 20:08:32 +08:00
parent d923cbde61
commit e91015f051
No known key found for this signature in database
GPG Key ID: DA25A2861AA0F2D1

View File

@ -5,7 +5,7 @@ import (
)
func TestGetCurrentIP(t *testing.T) {
conf := &Settings{IPUrl: "http://members.3322.org/dyndns/getip"}
conf := &Settings{IPUrl: "https://myip.biturl.top"}
ip, _ := GetCurrentIP(conf)
if ip == "" {
@ -13,13 +13,6 @@ func TestGetCurrentIP(t *testing.T) {
} else {
t.Log("IP is:" + ip)
}
conf = &Settings{Socks5Proxy: "localhost:8899", IPUrl: "http://members.3322.org/dyndns/getip"}
ip, err := GetCurrentIP(conf)
if ip != "" && err == nil {
t.Error("should return error")
}
}
func TestCheckSettings(t *testing.T) {