Skip to content

refactor(coderd/healthcheck): move derp report to derphealth package #9506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/netcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"golang.org/x/xerrors"

"github.com/coder/coder/v2/cli/clibase"
"github.com/coder/coder/v2/coderd/healthcheck"
"github.com/coder/coder/v2/coderd/healthcheck/derphealth"
"github.com/coder/coder/v2/codersdk"
)

Expand All @@ -33,8 +33,8 @@ func (r *RootCmd) netcheck() *clibase.Cmd {

_, _ = fmt.Fprint(inv.Stderr, "Gathering a network report. This may take a few seconds...\n\n")

var report healthcheck.DERPReport
report.Run(ctx, &healthcheck.DERPReportOptions{
var report derphealth.Report
report.Run(ctx, &derphealth.ReportOptions{
DERPMap: connInfo.DERPMap,
})

Expand Down
4 changes: 2 additions & 2 deletions cli/netcheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/coder/coder/v2/cli/clitest"
"github.com/coder/coder/v2/coderd/healthcheck"
"github.com/coder/coder/v2/coderd/healthcheck/derphealth"
"github.com/coder/coder/v2/pty/ptytest"
)

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

b := out.Bytes()
t.Log(string(b))
var report healthcheck.DERPReport
var report derphealth.Report
require.NoError(t, json.Unmarshal(b, &report))

assert.True(t, report.Healthy)
Expand Down
62 changes: 31 additions & 31 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 31 additions & 31 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading