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()