Skip to content

Commit 72fc99d

Browse files
authored
Another "known failure" error to allow in tests (#2379)
1 parent f2beead commit 72fc99d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/docker/errors.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func isMissingDeviceDriverError(err error) bool {
5151
strings.Contains(msg, "nvidia-container-cli: initialization error")
5252
}
5353

54+
// isNetworkError checks if the error is a network error. This is janky and intended for use in tests only
5455
func isNetworkError(err error) bool {
5556
// for both CLI and API clients, network errors are wrapped and lose the net.Error interface
5657
// CLI client: wrapped by exec.Command as exec.ExitError
@@ -65,6 +66,7 @@ func isNetworkError(err error) bool {
6566
"EOF",
6667
"no route to host",
6768
"network is unreachable",
69+
"server closed",
6870
}
6971

7072
for _, errStr := range networkErrorStrings {

0 commit comments

Comments
 (0)