From 060fb57d2891b1aa3acb1f2f82e3b37b508d034c Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Mon, 11 Aug 2025 12:32:29 +0100 Subject: [PATCH] chore(enterprise/coderd): ignore log errors in TestGetCryptoKeys/Unauthorized (#19282) Fixes https://github.com/coder/internal/issues/797 --- enterprise/coderd/workspaceproxy_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/enterprise/coderd/workspaceproxy_test.go b/enterprise/coderd/workspaceproxy_test.go index 23775f370f..7024ad2366 100644 --- a/enterprise/coderd/workspaceproxy_test.go +++ b/enterprise/coderd/workspaceproxy_test.go @@ -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{