From d62d2492fd442a349680a1eb487f85243ebc928a Mon Sep 17 00:00:00 2001 From: Michael Dwan Date: Fri, 30 May 2025 10:39:11 -0600 Subject: [PATCH] Another "known failure" error to allow in tests --- pkg/docker/errors.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/docker/errors.go b/pkg/docker/errors.go index fecbca2050..300d1ae317 100644 --- a/pkg/docker/errors.go +++ b/pkg/docker/errors.go @@ -51,6 +51,7 @@ func isMissingDeviceDriverError(err error) bool { strings.Contains(msg, "nvidia-container-cli: initialization error") } +// isNetworkError checks if the error is a network error. This is janky and intended for use in tests only func isNetworkError(err error) bool { // for both CLI and API clients, network errors are wrapped and lose the net.Error interface // CLI client: wrapped by exec.Command as exec.ExitError @@ -65,6 +66,7 @@ func isNetworkError(err error) bool { "EOF", "no route to host", "network is unreachable", + "server closed", } for _, errStr := range networkErrorStrings {