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:
Mario Constanti 2024-02-20 06:33:21 +01:00
parent 1d8d9459eb
commit 97f172eb51
8 changed files with 56 additions and 50 deletions

View file

@ -60,7 +60,7 @@ type EnterpriseTestSuite struct {
}
func (s *EnterpriseTestSuite) SetupTest() {
adminCtx := auth.GetAdminContext()
adminCtx := auth.GetAdminContext(nil)
// create testing sqlite database
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())