From 90821abcd626294b52a77b0a417fc8d671ba4e9d Mon Sep 17 00:00:00 2001 From: Haelnorr Date: Tue, 18 Feb 2025 23:49:39 +1100 Subject: [PATCH] Fixed main_test never starting because of port misconfiguration --- main_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index e806e32..60faa95 100644 --- a/main_test.go +++ b/main_test.go @@ -20,9 +20,12 @@ func Test_main(t *testing.T) { t.Cleanup(cancel) args := map[string]string{} var stdout bytes.Buffer + os.Setenv("SECRET_KEY", ".") + os.Setenv("HOST", "127.0.0.1") + os.Setenv("PORT", "3232") go run(ctx, &stdout, args) - waitForReady(ctx, 10*time.Second, "http://localhost:3333/healthz") + waitForReady(ctx, 10*time.Second, "http://127.0.0.1:3232/healthz") t.Run("SIGUSR1 puts database into global lock", func(t *testing.T) { done := make(chan bool)