File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,25 @@ func TestHealthcheck(t *testing.T) {
77
77
},
78
78
healthy : false ,
79
79
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 ,
80
99
}, {
81
100
name : "AccessURLFail" ,
82
101
checker : & testChecker {
@@ -153,6 +172,7 @@ func TestHealthcheck(t *testing.T) {
153
172
assert .Equal (t , c .healthy , report .Healthy )
154
173
assert .Equal (t , c .failingSections , report .FailingSections )
155
174
assert .Equal (t , c .checker .DERPReport .Healthy , report .DERP .Healthy )
175
+ assert .Equal (t , c .checker .DERPReport .Warnings , report .DERP .Warnings )
156
176
assert .Equal (t , c .checker .AccessURLReport .Healthy , report .AccessURL .Healthy )
157
177
assert .Equal (t , c .checker .WebsocketReport .Healthy , report .Websocket .Healthy )
158
178
assert .NotZero (t , report .Time )
You can’t perform that action at this time.
0 commit comments