diff --git a/agent/apphealth_test.go b/agent/apphealth_test.go index dbcb40b7e69e9..ff411433e3821 100644 --- a/agent/apphealth_test.go +++ b/agent/apphealth_test.go @@ -56,15 +56,16 @@ func TestAppHealth_Healthy(t *testing.T) { Health: codersdk.WorkspaceAppHealthInitializing, }, } - checks := make(map[string]int) + checks2 := 0 + checks3 := 0 handlers := []http.Handler{ nil, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - checks["app2"]++ + checks2++ httpapi.Write(r.Context(), w, http.StatusOK, nil) }), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - checks["app3"]++ + checks3++ httpapi.Write(r.Context(), w, http.StatusOK, nil) }), } @@ -109,8 +110,8 @@ func TestAppHealth_Healthy(t *testing.T) { require.Equal(t, codersdk.WorkspaceAppHealthHealthy, apps[2].Health) // ensure we aren't spamming - require.Equal(t, 2, checks["app2"]) - require.Equal(t, 1, checks["app3"]) + require.Equal(t, 2, checks2) + require.Equal(t, 1, checks3) } func TestAppHealth_500(t *testing.T) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy