File tree 1 file changed +16
-12
lines changed 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,22 @@ func TestWorkspaceProxies(t *testing.T) {
191
191
}
192
192
}
193
193
194
+ func TestWorkspaceProxy_ErrorDismissed (t * testing.T ) {
195
+ t .Parallel ()
196
+
197
+ var report healthcheck.WorkspaceProxyReport
198
+ report .Run (context .Background (), & healthcheck.WorkspaceProxyReportOptions {
199
+ WorkspaceProxiesFetchUpdater : & fakeWorkspaceProxyFetchUpdater {
200
+ fetchFunc : fakeFetchWorkspaceProxiesErr (assert .AnError ),
201
+ updateFunc : fakeUpdateProxyHealth (assert .AnError ),
202
+ },
203
+ Dismissed : true ,
204
+ })
205
+
206
+ assert .True (t , report .Dismissed )
207
+ assert .Equal (t , health .SeverityWarning , report .Severity )
208
+ }
209
+
194
210
// yet another implementation of the thing
195
211
type fakeWorkspaceProxyFetchUpdater struct {
196
212
fetchFunc func (context.Context ) (codersdk.RegionsResponse [codersdk.WorkspaceProxy ], error )
@@ -236,15 +252,3 @@ func fakeUpdateProxyHealth(err error) func(context.Context) error {
236
252
return err
237
253
}
238
254
}
239
-
240
- func TestWorkspaceProxy_Dismissed (t * testing.T ) {
241
- t .Parallel ()
242
-
243
- var report healthcheck.WorkspaceProxyReport
244
- report .Run (context .Background (), & healthcheck.WorkspaceProxyReportOptions {
245
- Dismissed : true ,
246
- })
247
-
248
- assert .True (t , report .Dismissed )
249
- assert .Equal (t , health .SeverityOK , report .Severity )
250
- }
You can’t perform that action at this time.
0 commit comments