MCPcopy Index your code
hub / github.com/coder/coder / TestWorkspaceProxy_ErrorDismissed

Function TestWorkspaceProxy_ErrorDismissed

coderd/healthcheck/workspaceproxy_test.go:216–230  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

214}
215
216func 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
233type fakeWorkspaceProxyFetchUpdater struct {

Callers

nothing calls this directly

Calls 4

RunMethod · 0.95
fakeUpdateProxyHealthFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected