(t *testing.T)
| 214 | } |
| 215 | |
| 216 | func TestWorkspaceProxy_ErrorDismissed(t *testing.T) { |
| 217 | t.Parallel() |
| 218 | |
| 219 | var report healthcheck.WorkspaceProxyReport |
| 220 | report.Run(context.Background(), &healthcheck.WorkspaceProxyReportOptions{ |
| 221 | WorkspaceProxiesFetchUpdater: &fakeWorkspaceProxyFetchUpdater{ |
| 222 | fetchFunc: fakeFetchWorkspaceProxiesErr(assert.AnError), |
| 223 | updateFunc: fakeUpdateProxyHealth(assert.AnError), |
| 224 | }, |
| 225 | Dismissed: true, |
| 226 | }) |
| 227 | |
| 228 | assert.True(t, report.Dismissed) |
| 229 | assert.Equal(t, health.SeverityWarning, report.Severity) |
| 230 | } |
| 231 | |
| 232 | // yet another implementation of the thing |
| 233 | type fakeWorkspaceProxyFetchUpdater struct { |
nothing calls this directly
no test coverage detected