diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2020-10-15 08:44:05 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2020-10-15 08:44:05 +0200 |
commit | 308948b3838c88621e738762241e8d1980881a17 (patch) | |
tree | 0cef7c4eb067c2320167634850598bd7d96cc953 /client/httpsclient_test.go | |
parent | 3f03127314bd768efd0bef57915320545afcdd78 (diff) | |
download | gitlab-shell-zj-remove-testify-assert.tar.gz |
tests: Replace assert with requirezj-remove-testify-assert
Testify features sub packages `assert` and `require`. The difference is
subtle, and lost on novice Golang developers that don't read the docs.
To create a more consistent code base `assert` will no longer be used.
This change was generated by a running a sed command on all `_test.go`
files, followed by `goimports -w`.
Diffstat (limited to 'client/httpsclient_test.go')
-rw-r--r-- | client/httpsclient_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/client/httpsclient_test.go b/client/httpsclient_test.go index 0cf77e3..d76890b 100644 --- a/client/httpsclient_test.go +++ b/client/httpsclient_test.go @@ -8,7 +8,6 @@ import ( "path" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitlab-shell/client/testserver" "gitlab.com/gitlab-org/gitlab-shell/internal/testhelper" @@ -51,8 +50,8 @@ func TestSuccessfulRequests(t *testing.T) { defer response.Body.Close() responseBody, err := ioutil.ReadAll(response.Body) - assert.NoError(t, err) - assert.Equal(t, string(responseBody), "Hello") + require.NoError(t, err) + require.Equal(t, string(responseBody), "Hello") }) } } @@ -84,7 +83,7 @@ func TestFailedRequests(t *testing.T) { _, err := client.Get(context.Background(), "/hello") require.Error(t, err) - assert.Equal(t, err.Error(), "Internal API unreachable") + require.Equal(t, err.Error(), "Internal API unreachable") }) } } |