From 61c9470bcf249825905c6f3494d49a06a670e0f4 Mon Sep 17 00:00:00 2001 From: Fabian Fulga Date: Thu, 20 Jun 2024 17:26:14 +0300 Subject: [PATCH] Remove duplicate of watcher.SetWatcher --- database/sql/repositories_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/database/sql/repositories_test.go b/database/sql/repositories_test.go index 34b07bd1..313396f8 100644 --- a/database/sql/repositories_test.go +++ b/database/sql/repositories_test.go @@ -45,6 +45,10 @@ type RepoTestFixtures struct { SQLMock sqlmock.Sqlmock } +func init() { + watcher.SetWatcher(&garmTesting.MockWatcher{}) +} + type RepoTestSuite struct { suite.Suite Store dbCommon.Store @@ -829,10 +833,5 @@ func (s *RepoTestSuite) TestUpdateRepositoryPoolInvalidRepoID() { func TestRepoTestSuite(t *testing.T) { t.Parallel() - watcher.SetWatcher(&garmTesting.MockWatcher{}) suite.Run(t, new(RepoTestSuite)) } - -func init() { - watcher.SetWatcher(&garmTesting.MockWatcher{}) -}