cron main test localhost ok

main
bel 2025-05-04 09:58:32 -06:00
parent b200deb98f
commit 32a010e697
1 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,10 @@ import (
) )
func TestOne(t *testing.T) { 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) ctx, can := context.WithTimeout(context.Background(), 5*time.Second)
defer can() defer can()
@ -25,7 +29,7 @@ func TestOne(t *testing.T) {
}, },
"feeds": func(t *testing.T) context.Context { "feeds": func(t *testing.T) context.Context {
gets := []string{} gets := []string{}
sURL := "http://192.168.0.167:10000/" sURL := "http://localhost:10000/"
s := &http.Server{ s := &http.Server{
Addr: ":10000", Addr: ":10000",
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {