From 32a010e6973727194eae6a9a2163f58116fd811a Mon Sep 17 00:00:00 2001 From: bel Date: Sun, 4 May 2025 09:58:32 -0600 Subject: [PATCH] cron main test localhost ok --- src/cmd/cron/main_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmd/cron/main_test.go b/src/cmd/cron/main_test.go index 052d844..7d73557 100644 --- a/src/cmd/cron/main_test.go +++ b/src/cmd/cron/main_test.go @@ -16,6 +16,10 @@ import ( ) func TestOne(t *testing.T) { + was := feeds.ProxyU + feeds.ProxyU = nil + t.Cleanup(func() { feeds.ProxyU = was }) + ctx, can := context.WithTimeout(context.Background(), 5*time.Second) defer can() @@ -25,7 +29,7 @@ func TestOne(t *testing.T) { }, "feeds": func(t *testing.T) context.Context { gets := []string{} - sURL := "http://192.168.0.167:10000/" + sURL := "http://localhost:10000/" s := &http.Server{ Addr: ":10000", Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {