diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-04-06 11:24:05 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2018-04-06 11:24:05 +0300 |
commit | adb34a203b860ca19980b9d521630f4a6da12150 (patch) | |
tree | dfac15449fedcce436c484952e3c12ced61057cd /internal/helper/repo_test.go | |
parent | c0017a069b4e051430cd0cb4363a1ff0b7dc2f76 (diff) |
Run Go test suite with '-race' in CI
Diffstat (limited to 'internal/helper/repo_test.go')
-rw-r--r-- | internal/helper/repo_test.go | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/internal/helper/repo_test.go b/internal/helper/repo_test.go index 8183ba7c3..5bb307b2e 100644 --- a/internal/helper/repo_test.go +++ b/internal/helper/repo_test.go @@ -121,20 +121,22 @@ func TestGetRepoPath(t *testing.T) { } for _, tc := range testCases { - config.Config.Storages = tc.storages - path, err := GetRepoPath(tc.repo) - - if tc.err != codes.OK { - testhelper.AssertGrpcError(t, err, tc.err, "") - continue - } - - if err != nil { - assert.NoError(t, err, tc.desc) - continue - } - - assert.Equal(t, tc.path, path, tc.desc) + t.Run(tc.desc, func(t *testing.T) { + config.Config.Storages = tc.storages + path, err := GetRepoPath(tc.repo) + + if tc.err != codes.OK { + testhelper.AssertGrpcError(t, err, tc.err, "") + return + } + + if err != nil { + assert.NoError(t, err) + return + } + + assert.Equal(t, tc.path, path) + }) } } |