diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2020-03-20 20:59:45 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2020-03-23 12:24:34 +0300 |
commit | 8a26afc2a56eb99d532be4e3d27b072dc566738e (patch) | |
tree | 07a0b2b0df6695153f292cd5eb7b7070315e33e3 /internal/helper/repo_test.go | |
parent | 1d8a0091862afee5776465ed9a018b542c418482 (diff) |
explicitly load test configuration when needed
Explicitly configures test configuration for packages that need it.
This removes the import side effects of testhelpers package and makes
it safe to import without forcing configuration changes.
Diffstat (limited to 'internal/helper/repo_test.go')
-rw-r--r-- | internal/helper/repo_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/helper/repo_test.go b/internal/helper/repo_test.go index c6e9c921b..4683124df 100644 --- a/internal/helper/repo_test.go +++ b/internal/helper/repo_test.go @@ -12,6 +12,11 @@ import ( "google.golang.org/grpc/codes" ) +func TestMain(m *testing.M) { + testhelper.Configure() + os.Exit(m.Run()) +} + func TestGetRepoPath(t *testing.T) { defer func(oldStorages []config.Storage) { config.Config.Storages = oldStorages |