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

add test case

This commit is contained in:
Timothy 2017-10-27 14:44:44 +08:00
parent 62ac21417e
commit 377d91d969

View File

@ -13,6 +13,13 @@ func TestGetCurrentIP(t *testing.T) {
} else { } else {
t.Log("IP is:" + ip) 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) { func TestCheckSettings(t *testing.T) {