mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
update test case
This commit is contained in:
parent
d923cbde61
commit
e91015f051
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetCurrentIP(t *testing.T) {
|
func TestGetCurrentIP(t *testing.T) {
|
||||||
conf := &Settings{IPUrl: "http://members.3322.org/dyndns/getip"}
|
conf := &Settings{IPUrl: "https://myip.biturl.top"}
|
||||||
ip, _ := GetCurrentIP(conf)
|
ip, _ := GetCurrentIP(conf)
|
||||||
|
|
||||||
if ip == "" {
|
if ip == "" {
|
||||||
@ -13,13 +13,6 @@ 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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user