We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02ffff1 commit 8923ce5Copy full SHA for 8923ce5
agent/apphealth_test.go
@@ -56,15 +56,16 @@ func TestAppHealth_Healthy(t *testing.T) {
56
Health: codersdk.WorkspaceAppHealthInitializing,
57
},
58
}
59
- checks := make(map[string]int)
+ checks2 := 0
60
+ checks3 := 0
61
handlers := []http.Handler{
62
nil,
63
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- checks["app2"]++
64
+ checks2++
65
httpapi.Write(r.Context(), w, http.StatusOK, nil)
66
}),
67
- checks["app3"]++
68
+ checks3++
69
70
71
@@ -109,8 +110,8 @@ func TestAppHealth_Healthy(t *testing.T) {
109
110
require.Equal(t, codersdk.WorkspaceAppHealthHealthy, apps[2].Health)
111
112
// ensure we aren't spamming
- require.Equal(t, 2, checks["app2"])
113
- require.Equal(t, 1, checks["app3"])
+ require.Equal(t, 2, checks2)
114
+ require.Equal(t, 1, checks3)
115
116
117
func TestAppHealth_500(t *testing.T) {
0 commit comments