Skip to content

Commit 3fa77ce

Browse files
committed
refactor(codersdk): extract common fields from HealthReport and friends
1 parent d3790bb commit 3fa77ce

File tree

5 files changed

+299
-189
lines changed

5 files changed

+299
-189
lines changed

coderd/debug_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func TestDebugHealth(t *testing.T) {
213213
return &healthsdk.HealthcheckReport{
214214
Time: time.Now(),
215215
Healthy: true,
216-
DERP: healthsdk.DERPHealthReport{Healthy: true},
216+
DERP: healthsdk.DERPHealthReport{BaseReport: healthsdk.BaseReport{Healthy: true}},
217217
}
218218
},
219219
})

coderd/healthcheck/derphealth/derp.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ func (r *RegionReport) Run(ctx context.Context) {
133133
node = node
134134
nodeReport = NodeReport{
135135
DERPNodeReport: healthsdk.DERPNodeReport{
136-
Node: node,
137-
Healthy: true,
136+
BaseReport: healthsdk.BaseReport{
137+
Healthy: true,
138+
},
139+
Node: node,
138140
},
139141
}
140142
)

0 commit comments

Comments
 (0)