diff --git a/agent/agent_test.go b/agent/agent_test.go index ca30bf3b98280..596471b49f603 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -35,7 +35,6 @@ import ( "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/valyala/fasthttp/fasthttputil" "go.uber.org/goleak" "go.uber.org/mock/gomock" "golang.org/x/crypto/ssh" @@ -2028,8 +2027,9 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati agent.Agent, ) { logger := slogtest.Make(t, &slogtest.Options{ - // we get this error when closing the Agent API - IgnoredErrorIs: append(slogtest.DefaultIgnoredErrorIs, fasthttputil.ErrInmemoryListenerClosed), + // Agent can drop errors when shutting down, and some, like the + // fasthttplistener connection closed error, are unexported. + IgnoreErrors: true, }).Leveled(slog.LevelDebug) if metadata.DERPMap == nil { metadata.DERPMap, _ = tailnettest.RunDERPAndSTUN(t)