fix: improve metrics collection loop
by adding the context from main and make auth.GetAdminContext accepting a context we are now able to stop the metrics collection loop once the context is canceled Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
1d8d9459eb
commit
97f172eb51
8 changed files with 56 additions and 50 deletions
|
|
@ -59,7 +59,7 @@ type RepoTestSuite struct {
|
|||
}
|
||||
|
||||
func (s *RepoTestSuite) SetupTest() {
|
||||
adminCtx := auth.GetAdminContext()
|
||||
adminCtx := auth.GetAdminContext(nil)
|
||||
|
||||
// create testing sqlite database
|
||||
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
||||
|
|
@ -90,7 +90,7 @@ func (s *RepoTestSuite) SetupTest() {
|
|||
var minIdleRunners uint = 20
|
||||
providerMock := runnerCommonMocks.NewProvider(s.T())
|
||||
fixtures := &RepoTestFixtures{
|
||||
AdminContext: auth.GetAdminContext(),
|
||||
AdminContext: auth.GetAdminContext(nil),
|
||||
Store: db,
|
||||
StoreRepos: repos,
|
||||
Providers: map[string]common.Provider{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue