coremodels: Always take runtime arg for NewBase() (#56677)
This commit is contained in:
@@ -64,7 +64,7 @@ func TestGetHomeDashboard(t *testing.T) {
|
||||
SQLStore: mockstore.NewSQLStoreMock(),
|
||||
preferenceService: prefService,
|
||||
dashboardVersionService: dashboardVersionService,
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@@ -148,7 +148,7 @@ func TestDashboardAPIEndpoint(t *testing.T) {
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
DashboardService: dashboardService,
|
||||
dashboardVersionService: fakeDashboardVersionService,
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
setUp := func() {
|
||||
@@ -270,7 +270,7 @@ func TestDashboardAPIEndpoint(t *testing.T) {
|
||||
DashboardService: dashboardService,
|
||||
dashboardVersionService: fakeDashboardVersionService,
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
setUp := func() {
|
||||
@@ -913,7 +913,7 @@ func TestDashboardAPIEndpoint(t *testing.T) {
|
||||
AccessControl: accesscontrolmock.New(),
|
||||
DashboardService: dashboardService,
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
hs.callGetDashboard(sc)
|
||||
|
||||
@@ -968,7 +968,7 @@ func getDashboardShouldReturn200WithConfig(t *testing.T, sc *scenarioContext, pr
|
||||
),
|
||||
DashboardService: dashboardService,
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
hs.callGetDashboard(sc)
|
||||
@@ -1034,7 +1034,7 @@ func postDashboardScenario(t *testing.T, desc string, url string, routePattern s
|
||||
DashboardService: dashboardService,
|
||||
folderService: folderService,
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
sc := setupScenarioContext(t, url)
|
||||
@@ -1067,7 +1067,7 @@ func postDiffScenario(t *testing.T, desc string, url string, routePattern string
|
||||
SQLStore: sqlmock,
|
||||
dashboardVersionService: fakeDashboardVersionService,
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
sc := setupScenarioContext(t, url)
|
||||
@@ -1106,7 +1106,7 @@ func restoreDashboardVersionScenario(t *testing.T, desc string, url string, rout
|
||||
SQLStore: sqlStore,
|
||||
Features: featuremgmt.WithFeatures(),
|
||||
dashboardVersionService: fakeDashboardVersionService,
|
||||
Coremodels: registry.NewBase(),
|
||||
Coremodels: registry.NewBase(nil),
|
||||
}
|
||||
|
||||
sc := setupScenarioContext(t, url)
|
||||
|
||||
Reference in New Issue
Block a user