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/config/config_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 'internal/config/config_test.go')
-rw-r--r-- | internal/config/config_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 77351f2..f90e73c 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -5,7 +5,6 @@ import ( "path" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitlab-shell/internal/testhelper" ) @@ -110,12 +109,12 @@ func TestParseConfig(t *testing.T) { err := parseConfig([]byte(tc.yaml), &cfg) require.NoError(t, err) - assert.Equal(t, tc.path, cfg.LogFile) - assert.Equal(t, tc.format, cfg.LogFormat) - assert.Equal(t, tc.gitlabUrl, cfg.GitlabUrl) - assert.Equal(t, tc.secret, cfg.Secret) - assert.Equal(t, tc.sslCertDir, cfg.SslCertDir) - assert.Equal(t, tc.httpSettings, cfg.HttpSettings) + require.Equal(t, tc.path, cfg.LogFile) + require.Equal(t, tc.format, cfg.LogFormat) + require.Equal(t, tc.gitlabUrl, cfg.GitlabUrl) + require.Equal(t, tc.secret, cfg.Secret) + require.Equal(t, tc.sslCertDir, cfg.SslCertDir) + require.Equal(t, tc.httpSettings, cfg.HttpSettings) }) } } |