mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 06:22:13 +08:00
Chore: Remove Store interface and use db.DB instead (#60160)
* Chore: Remove Store interface and use db.DB instead * use old-style session exec
This commit is contained in:
@ -68,11 +68,11 @@ import (
|
||||
"github.com/grafana/grafana/pkg/web/webtest"
|
||||
)
|
||||
|
||||
func loggedInUserScenario(t *testing.T, desc string, url string, routePattern string, fn scenarioFunc, sqlStore sqlstore.Store) {
|
||||
func loggedInUserScenario(t *testing.T, desc string, url string, routePattern string, fn scenarioFunc, sqlStore db.DB) {
|
||||
loggedInUserScenarioWithRole(t, desc, "GET", url, routePattern, org.RoleEditor, fn, sqlStore)
|
||||
}
|
||||
|
||||
func loggedInUserScenarioWithRole(t *testing.T, desc string, method string, url string, routePattern string, role org.RoleType, fn scenarioFunc, sqlStore sqlstore.Store) {
|
||||
func loggedInUserScenarioWithRole(t *testing.T, desc string, method string, url string, routePattern string, role org.RoleType, fn scenarioFunc, sqlStore db.DB) {
|
||||
t.Run(fmt.Sprintf("%s %s", desc, url), func(t *testing.T) {
|
||||
sc := setupScenarioContext(t, url)
|
||||
sc.sqlStore = sqlStore
|
||||
@ -186,7 +186,7 @@ type scenarioContext struct {
|
||||
req *http.Request
|
||||
url string
|
||||
userAuthTokenService *authtest.FakeUserAuthTokenService
|
||||
sqlStore sqlstore.Store
|
||||
sqlStore db.DB
|
||||
authInfoService *logintest.AuthInfoServiceFake
|
||||
dashboardVersionService dashver.Service
|
||||
userService user.Service
|
||||
@ -376,7 +376,7 @@ func setupHTTPServerWithCfg(t *testing.T, useFakeAccessControl bool, cfg *settin
|
||||
|
||||
func setupHTTPServerWithCfgDb(
|
||||
t *testing.T, useFakeAccessControl bool, cfg *setting.Cfg, db *sqlstore.SQLStore,
|
||||
store sqlstore.Store, features *featuremgmt.FeatureManager, options ...APITestServerOption,
|
||||
store db.DB, features *featuremgmt.FeatureManager, options ...APITestServerOption,
|
||||
) accessControlScenarioContext {
|
||||
t.Helper()
|
||||
license := &licensing.OSSLicensingService{}
|
||||
|
Reference in New Issue
Block a user