mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-26 19:11:55 +01:00
This is not an indication of an error, and for some reason, httpbin.org is not reachable from the ppc64le builders.
32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
Description: These tests try to connect to httpbin.org to do some testing. When
|
|
httpbin.org is not available, this does not indicate a test failure. Furthermore,
|
|
just calling suite.NoError does not stop the execution of the function, so it
|
|
would error out when respo.Body is nil.
|
|
|
|
diff --git a/network/network_test.go b/network/network_test.go
|
|
index 86b5f0c..e46a538 100644
|
|
--- a/network/network_test.go
|
|
+++ b/network/network_test.go
|
|
@@ -32,7 +32,9 @@ func (suite *NetworkTestSuite) TestLocalHTTPRequest() {
|
|
client := ntw.MakeHTTPClient(nil)
|
|
|
|
resp, err := client.Get(suite.httpServer.URL + "/headers") // nolint: noctx
|
|
- suite.NoError(err)
|
|
+ if ! suite.NoError(err) {
|
|
+ suite.T().Skip("Network error")
|
|
+ }
|
|
|
|
defer resp.Body.Close()
|
|
|
|
@@ -57,7 +59,9 @@ func (suite *NetworkTestSuite) TestRealHTTPRequest() {
|
|
client := ntw.MakeHTTPClient(nil)
|
|
|
|
resp, err := client.Get("https://httpbin.org/headers") // nolint: noctx
|
|
- suite.NoError(err)
|
|
+ if ! suite.NoError(err) {
|
|
+ suite.T().Skip("Network error")
|
|
+ }
|
|
|
|
defer resp.Body.Close()
|
|
|