Skip to content

Commit

Permalink
test: Make TestDo_DNSFail work on ubuntu (or my computer at least) (#…
Browse files Browse the repository at this point in the history
…4476)

Getting a different error locally so the test would fail.
  • Loading branch information
Markus Westerlind authored Feb 11, 2022
1 parent bacec19 commit ee44519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/experimental/http/requests/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ requests.do(method: "GET", url:"http://notarealaddressatall/path/a/b/c", headers
if err == nil {
t.Fatal("expected failure")
}
if !strings.Contains(err.Error(), "no such host") {
if !strings.Contains(err.Error(), "no such host") && !strings.Contains(err.Error(), "Temporary failure in name resolution") {
t.Errorf("unexpected cause of failure, got err: %v", err)
}
}
Expand Down

0 comments on commit ee44519

Please sign in to comment.