From 7d0ab96fb592d6587ac4e51832cc5681c53dc569 Mon Sep 17 00:00:00 2001 From: Timothy Date: Sat, 16 Jun 2018 14:19:14 +0800 Subject: [PATCH] Update utils_test.go --- utils_test.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/utils_test.go b/utils_test.go index 8a3ac0c..4d6a258 100644 --- a/utils_test.go +++ b/utils_test.go @@ -49,28 +49,3 @@ func TestCheckSettings(t *testing.T) { t.Error("HE setting without password, should be faild") } } - -func TestSaveCurrentIP(t *testing.T) { - SaveCurrentIP("1.2.3.4") - - if _, err := os.Stat("./.current_ip"); os.IsNotExist(err) { - t.Error(".current_ip file should exists") - } - - savedIP := LoadCurrentIP() - - if strings.TrimRight(savedIP, "\n") != "1.2.3.4" { - t.Error("saved IP should be equal to 1.2.3.4") - } - - //Cleanup - os.Remove("./.current_ip") -} - -func TestLoadCurrentIP(t *testing.T) { - ip := LoadCurrentIP() - - if ip != "" { - t.Error("current ip file should be empth") - } -}