healthyChecker returns a testChecker where all reports are healthy with SeverityOK. Tests override individual fields to test failure scenarios.
()
| 51 | // with SeverityOK. Tests override individual fields to test failure |
| 52 | // scenarios. |
| 53 | func 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 | |
| 81 | func TestHealthcheck(t *testing.T) { |
| 82 | t.Parallel() |