refactor(coderd): move healthcheck report structs to codersdk (#12279)

Moves healthcheck report-related structs from coderd/healthcheck to codersdk
This prevents an import cycle when adding a codersdk.Client method to hit /api/v2/debug/health.
This commit is contained in:
Cian Johnston
2024-02-23 13:13:28 +00:00
committed by GitHub
parent aa7a9f5cc4
commit 2cb9bfd517
21 changed files with 2314 additions and 2298 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/coder/coder/v2/cli/clitest"
"github.com/coder/coder/v2/coderd/healthcheck/derphealth"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/pty/ptytest"
)
@ -27,7 +27,7 @@ func TestNetcheck(t *testing.T) {
b := out.Bytes()
t.Log(string(b))
var report derphealth.Report
var report codersdk.DERPHealthReport
require.NoError(t, json.Unmarshal(b, &report))
assert.True(t, report.Healthy)