chore(enterprise/coderd): ignore log errors in TestGetCryptoKeys/Unauthorized (#19282)

Fixes https://github.com/coder/internal/issues/797
This commit is contained in:
Cian Johnston
2025-08-11 12:32:29 +01:00
committed by GitHub
parent 5d42b1861e
commit 060fb57d28
+6
View File
@@ -15,6 +15,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent/agenttest"
"github.com/coder/coder/v2/buildinfo"
"github.com/coder/coder/v2/coderd/coderdtest"
@@ -1009,11 +1010,16 @@ func TestGetCryptoKeys(t *testing.T) {
ctx := testutil.Context(t, testutil.WaitMedium)
db, pubsub := dbtestutil.NewDB(t)
// IgnoreErrors is set here to avoid a test failure due to "used of closed network connection".
logger := slogtest.Make(t, &slogtest.Options{
IgnoreErrors: true,
})
cclient, _, api, _ := coderdenttest.NewWithAPI(t, &coderdenttest.Options{
Options: &coderdtest.Options{
Database: db,
Pubsub: pubsub,
IncludeProvisionerDaemon: true,
Logger: &logger,
},
LicenseOptions: &coderdenttest.LicenseOptions{
Features: license.Features{