fix: switch to context.Background() for adminctx
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
2a3e4d6563
commit
b1cbfac08a
5 changed files with 6 additions and 6 deletions
|
|
@ -37,7 +37,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewAPIController(r *runner.Runner, authenticator *auth.Authenticator, hub *wsWriter.Hub) (*APIController, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "failed to get controller info")
|
return nil, errors.Wrap(err, "failed to get controller info")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ type EnterpriseTestSuite struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *EnterpriseTestSuite) SetupTest() {
|
func (s *EnterpriseTestSuite) SetupTest() {
|
||||||
adminCtx := auth.GetAdminContext(context.TODO())
|
adminCtx := auth.GetAdminContext(context.Background())
|
||||||
|
|
||||||
// create testing sqlite database
|
// create testing sqlite database
|
||||||
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ type OrgTestSuite struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *OrgTestSuite) SetupTest() {
|
func (s *OrgTestSuite) SetupTest() {
|
||||||
adminCtx := auth.GetAdminContext(context.TODO())
|
adminCtx := auth.GetAdminContext(context.Background())
|
||||||
|
|
||||||
// create testing sqlite database
|
// create testing sqlite database
|
||||||
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ type PoolTestSuite struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *PoolTestSuite) SetupTest() {
|
func (s *PoolTestSuite) SetupTest() {
|
||||||
adminCtx := auth.GetAdminContext(context.TODO())
|
adminCtx := auth.GetAdminContext(context.Background())
|
||||||
|
|
||||||
// create testing sqlite database
|
// create testing sqlite database
|
||||||
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ type RepoTestSuite struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *RepoTestSuite) SetupTest() {
|
func (s *RepoTestSuite) SetupTest() {
|
||||||
adminCtx := auth.GetAdminContext(context.TODO())
|
adminCtx := auth.GetAdminContext(context.Background())
|
||||||
|
|
||||||
// create testing sqlite database
|
// create testing sqlite database
|
||||||
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
dbCfg := garmTesting.GetTestSqliteDBConfig(s.T())
|
||||||
|
|
@ -90,7 +90,7 @@ func (s *RepoTestSuite) SetupTest() {
|
||||||
var minIdleRunners uint = 20
|
var minIdleRunners uint = 20
|
||||||
providerMock := runnerCommonMocks.NewProvider(s.T())
|
providerMock := runnerCommonMocks.NewProvider(s.T())
|
||||||
fixtures := &RepoTestFixtures{
|
fixtures := &RepoTestFixtures{
|
||||||
AdminContext: auth.GetAdminContext(context.TODO()),
|
AdminContext: auth.GetAdminContext(context.Background()),
|
||||||
Store: db,
|
Store: db,
|
||||||
StoreRepos: repos,
|
StoreRepos: repos,
|
||||||
Providers: map[string]common.Provider{
|
Providers: map[string]common.Provider{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue