From 377d91d969e78060f722cf40d11b159c96fd2b75 Mon Sep 17 00:00:00 2001 From: Timothy Date: Fri, 27 Oct 2017 14:44:44 +0800 Subject: [PATCH] add test case --- utils_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils_test.go b/utils_test.go index fcc51b8..bab2979 100644 --- a/utils_test.go +++ b/utils_test.go @@ -13,6 +13,13 @@ 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) {