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
+2 -2
View File
@@ -5,7 +5,6 @@ import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/coder/coder/v2/cli/clitest"
@@ -30,7 +29,8 @@ func TestNetcheck(t *testing.T) {
var report healthsdk.DERPHealthReport
require.NoError(t, json.Unmarshal(b, &report))
assert.True(t, report.Healthy)
// We do not assert that the report is healthy, just that
// it has the expected number of reports per region.
require.Len(t, report.Regions, 1+1) // 1 built-in region + 1 test-managed STUN region
for _, v := range report.Regions {
require.Len(t, v.NodeReports, len(v.Region.Nodes))