chore(cli): address cli netcheck test flake (#13492)

* netcheck: removes check for healthy node report in test
* coderd/healthcheck/derphealth: do not override parent context deadline
This commit is contained in:
Cian Johnston
2024-06-07 10:01:54 +01:00
committed by GitHub
parent 7c3b8b6224
commit 48ecee1025
3 changed files with 48 additions and 4 deletions
+6 -2
View File
@@ -236,8 +236,12 @@ func (r *NodeReport) derpURL() *url.URL {
}
func (r *NodeReport) Run(ctx context.Context) {
ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
defer cancel()
// If there already is a deadline set on the context, do not override it.
if _, ok := ctx.Deadline(); !ok {
dCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
defer cancel()
ctx = dCtx
}
r.Severity = health.SeverityOK
r.ClientLogs = [][]string{}