Skip to content

Commit 2e7faa6

Browse files
committed
refactor(coderd): move healthcheck report structs to codersdk
1 parent 4cc132c commit 2e7faa6

22 files changed

+5557
-5547
lines changed

cli/netcheck.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (r *RootCmd) netcheck() *clibase.Cmd {
3838
DERPMap: connInfo.DERPMap,
3939
})
4040

41-
raw, err := json.MarshalIndent(report, "", " ")
41+
raw, err := json.MarshalIndent(report.DERPHealthReport, "", " ")
4242
if err != nil {
4343
return err
4444
}

cli/netcheck_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import (
55
"encoding/json"
66
"testing"
77

8+
"github.com/coder/coder/v2/codersdk"
9+
810
"github.com/stretchr/testify/assert"
911
"github.com/stretchr/testify/require"
1012

1113
"github.com/coder/coder/v2/cli/clitest"
12-
"github.com/coder/coder/v2/coderd/healthcheck/derphealth"
1314
"github.com/coder/coder/v2/pty/ptytest"
1415
)
1516

@@ -27,7 +28,7 @@ func TestNetcheck(t *testing.T) {
2728

2829
b := out.Bytes()
2930
t.Log(string(b))
30-
var report derphealth.Report
31+
var report codersdk.DERPHealthReport
3132
require.NoError(t, json.Unmarshal(b, &report))
3233

3334
assert.True(t, report.Healthy)

0 commit comments

Comments
 (0)