diff --git a/pkg/server/endpoints/endpoints_test.go b/pkg/server/endpoints/endpoints_test.go index f2b8bb27209..fe2ad1dded1 100644 --- a/pkg/server/endpoints/endpoints_test.go +++ b/pkg/server/endpoints/endpoints_test.go @@ -345,10 +345,11 @@ func TestListenAndServe(t *testing.T) { switch { case strings.Contains(err.Error(), "connection reset by peer"): + case strings.Contains(err.Error(), "connection was forcibly closed by the remote host"): case strings.Contains(err.Error(), "tls: bad certificate"): return default: - t.Error("expected invalid connection for misconfigured foreign admin caller") + t.Errorf("expected invalid connection for misconfigured foreign admin caller: %s", err.Error()) } } })