diff --git a/apiserver/controllers/controllers.go b/apiserver/controllers/controllers.go index e5b7db37..7c33695e 100644 --- a/apiserver/controllers/controllers.go +++ b/apiserver/controllers/controllers.go @@ -37,7 +37,7 @@ import ( ) func NewAPIController(r *runner.Runner, authenticator *auth.Authenticator, hub *wsWriter.Hub) (*APIController, error) { - controllerInfo, err := r.GetControllerInfo(auth.GetAdminContext(context.TODO())) + controllerInfo, err := r.GetControllerInfo(auth.GetAdminContext(context.Background())) if err != nil { return nil, errors.Wrap(err, "failed to get controller info") } diff --git a/runner/enterprises_test.go b/runner/enterprises_test.go index 400cbddd..922f1bff 100644 --- a/runner/enterprises_test.go +++ b/runner/enterprises_test.go @@ -60,7 +60,7 @@ type EnterpriseTestSuite struct { } func (s *EnterpriseTestSuite) SetupTest() { - adminCtx := auth.GetAdminContext(context.TODO()) + adminCtx := auth.GetAdminContext(context.Background()) // create testing sqlite database dbCfg := garmTesting.GetTestSqliteDBConfig(s.T()) diff --git a/runner/organizations_test.go b/runner/organizations_test.go index 7d6926c0..167dbccf 100644 --- a/runner/organizations_test.go +++ b/runner/organizations_test.go @@ -60,7 +60,7 @@ type OrgTestSuite struct { } func (s *OrgTestSuite) SetupTest() { - adminCtx := auth.GetAdminContext(context.TODO()) + adminCtx := auth.GetAdminContext(context.Background()) // create testing sqlite database dbCfg := garmTesting.GetTestSqliteDBConfig(s.T()) diff --git a/runner/pools_test.go b/runner/pools_test.go index e25a79c6..94fee6b6 100644 --- a/runner/pools_test.go +++ b/runner/pools_test.go @@ -47,7 +47,7 @@ type PoolTestSuite struct { } func (s *PoolTestSuite) SetupTest() { - adminCtx := auth.GetAdminContext(context.TODO()) + adminCtx := auth.GetAdminContext(context.Background()) // create testing sqlite database dbCfg := garmTesting.GetTestSqliteDBConfig(s.T()) diff --git a/runner/repositories_test.go b/runner/repositories_test.go index 8092ca2e..e5b59ade 100644 --- a/runner/repositories_test.go +++ b/runner/repositories_test.go @@ -59,7 +59,7 @@ type RepoTestSuite struct { } func (s *RepoTestSuite) SetupTest() { - adminCtx := auth.GetAdminContext(context.TODO()) + adminCtx := auth.GetAdminContext(context.Background()) // 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(context.TODO()), + AdminContext: auth.GetAdminContext(context.Background()), Store: db, StoreRepos: repos, Providers: map[string]common.Provider{