8000 Add another "known failure" error to allow in tests by michaeldwan · Pull Request #2379 · replicate/cog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add another "known failure" error to allow in tests #2379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/docker/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -65,6 +66,7 @@ func isNetworkError(err error) bool {
"EOF",
"no route to host",
"network is unreachable",
"server closed",
}

for _, errStr := range networkErrorStrings {
Expand Down
0