MCPcopy Create free account
hub / github.com/coder/coder / healthyChecker

Function healthyChecker

coderd/healthcheck/healthcheck_test.go:53–79  ·  view source on GitHub ↗

healthyChecker returns a testChecker where all reports are healthy with SeverityOK. Tests override individual fields to test failure scenarios.

()

Source from the content-addressed store, hash-verified

51// with SeverityOK. Tests override individual fields to test failure
52// scenarios.
53func healthyChecker() *testChecker {
54 return &testChecker{
55 DERPReport: healthsdk.DERPHealthReport{
56 Healthy: true,
57 BaseReport: healthsdk.BaseReport{Severity: health.SeverityOK},
58 },
59 AccessURLReport: healthsdk.AccessURLReport{
60 Healthy: true,
61 BaseReport: healthsdk.BaseReport{Severity: health.SeverityOK},
62 },
63 WebsocketReport: healthsdk.WebsocketReport{
64 Healthy: true,
65 BaseReport: healthsdk.BaseReport{Severity: health.SeverityOK},
66 },
67 DatabaseReport: healthsdk.DatabaseReport{
68 Healthy: true,
69 BaseReport: healthsdk.BaseReport{Severity: health.SeverityOK},
70 },
71 WorkspaceProxyReport: healthsdk.WorkspaceProxyReport{
72 Healthy: true,
73 BaseReport: healthsdk.BaseReport{Severity: health.SeverityOK},
74 },
75 ProvisionerDaemonsReport: healthsdk.ProvisionerDaemonsReport{
76 BaseReport: healthsdk.BaseReport{Severity: health.SeverityOK},
77 },
78 }
79}
80
81func TestHealthcheck(t *testing.T) {
82 t.Parallel()

Callers 1

TestHealthcheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected