Skip to content

Commit cec2e6d

Browse files
committed
another test
1 parent b66e38e commit cec2e6d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

coderd/healthcheck/healthcheck_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,25 @@ func TestHealthcheck(t *testing.T) {
7777
},
7878
healthy: false,
7979
failingSections: []string{healthcheck.SectionDERP},
80+
}, {
81+
name: "DERPWarning",
82+
checker: &testChecker{
83+
DERPReport: derphealth.Report{
84+
Healthy: true,
85+
Warnings: []string{"foobar"},
86+
},
87+
AccessURLReport: healthcheck.AccessURLReport{
88+
Healthy: true,
89+
},
90+
WebsocketReport: healthcheck.WebsocketReport{
91+
Healthy: true,
92+
},
93+
DatabaseReport: healthcheck.DatabaseReport{
94+
Healthy: true,
95+
},
96+
},
97+
healthy: true,
98+
failingSections: nil,
8099
}, {
81100
name: "AccessURLFail",
82101
checker: &testChecker{
@@ -153,6 +172,7 @@ func TestHealthcheck(t *testing.T) {
153172
assert.Equal(t, c.healthy, report.Healthy)
154173
assert.Equal(t, c.failingSections, report.FailingSections)
155174
assert.Equal(t, c.checker.DERPReport.Healthy, report.DERP.Healthy)
175+
assert.Equal(t, c.checker.DERPReport.Warnings, report.DERP.Warnings)
156176
assert.Equal(t, c.checker.AccessURLReport.Healthy, report.AccessURL.Healthy)
157177
assert.Equal(t, c.checker.WebsocketReport.Healthy, report.Websocket.Healthy)
158178
assert.NotZero(t, report.Time)

0 commit comments

Comments
 (0)