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 /internal/command/personalaccesstoken | |
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 'internal/command/personalaccesstoken')
-rw-r--r-- | internal/command/personalaccesstoken/personalaccesstoken_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/command/personalaccesstoken/personalaccesstoken_test.go b/internal/command/personalaccesstoken/personalaccesstoken_test.go index 5970142..aa56ce9 100644 --- a/internal/command/personalaccesstoken/personalaccesstoken_test.go +++ b/internal/command/personalaccesstoken/personalaccesstoken_test.go @@ -8,7 +8,6 @@ import ( "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitlab-shell/client/testserver" @@ -174,13 +173,13 @@ func TestExecute(t *testing.T) { err := cmd.Execute(context.Background()) if tc.expectedError == "" { - assert.NoError(t, err) + require.NoError(t, err) } else { - assert.EqualError(t, err, tc.expectedError) + require.EqualError(t, err, tc.expectedError) } if tc.expectedOutput != "" { - assert.Equal(t, tc.expectedOutput, output.String()) + require.Equal(t, tc.expectedOutput, output.String()) } }) } |