diff --git a/integration/main_test.go b/integration/main_test.go index a40682e..e0ec8f2 100644 --- a/integration/main_test.go +++ b/integration/main_test.go @@ -32,14 +32,18 @@ func TestMain(t *testing.T) { // test custom domain redirect resp, err := getTestHTTPSClient().Get("https://calciumdibromid.localhost.mock.directory:4430") assert.NoError(t, err) - assert.EqualValues(t, http.StatusTemporaryRedirect, resp.StatusCode) + if !assert.EqualValues(t, http.StatusTemporaryRedirect, resp.StatusCode) { + t.FailNow() + } assert.EqualValues(t, "https://www.cabr2.de/", resp.Header["Location"][0]) assert.EqualValues(t, 0, getSize(resp.Body)) // test get image resp, err = getTestHTTPSClient().Get("https://magiclike.localhost.mock.directory:4430/images/827679288a.jpg") assert.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.StatusCode) + if !assert.EqualValues(t, http.StatusOK, resp.StatusCode) { + t.FailNow() + } assert.EqualValues(t, "image/jpeg", resp.Header["Content-Type"][0]) assert.EqualValues(t, "124635", resp.Header["Content-Length"][0]) assert.EqualValues(t, 124635, getSize(resp.Body)) @@ -47,7 +51,9 @@ func TestMain(t *testing.T) { // specify branch resp, err = getTestHTTPSClient().Get("https://momar.localhost.mock.directory:4430/pag/@master/") assert.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.StatusCode) + if !assert.EqualValues(t, http.StatusOK, resp.StatusCode) { + t.FailNow() + } assert.EqualValues(t, "text/html; charset=utf-8", resp.Header["Content-Type"][0]) assert.True(t, getSize(resp.Body) > 1000) }