Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactionalDBSession in misc files (#43926)
* Refactor: Change sqlstore.inTransaction to SQLStore.WithTransactionalDBSession in misc files * Refactor: Change .inTransaction in org.go file * Refactor: Update init() to proper SQLStore handlers * Refactor: Update funcs in tests to be sqlStore methods * Refactor: Update API funcs to receive HTTPServer * Fix: define methods on sqlstore * Adjust GetSignedInUser calls * Refactor: Add sqlStore to Service struct * Chore: Add back black spaces to remove file from PR Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
This commit is contained in:
co-authored by
Ida Furjesova
parent
eed9e5543d
commit
92ca38bedf
@@ -80,7 +80,7 @@ func TestDashboardProvisioningTest(t *testing.T) {
|
||||
require.NotNil(t, query.Result)
|
||||
|
||||
deleteCmd := &models.DeleteOrphanedProvisionedDashboardsCommand{ReaderNames: []string{"default"}}
|
||||
require.Nil(t, DeleteOrphanedProvisionedDashboards(context.Background(), deleteCmd))
|
||||
require.Nil(t, sqlStore.DeleteOrphanedProvisionedDashboards(context.Background(), deleteCmd))
|
||||
|
||||
query = &models.GetDashboardsQuery{DashboardIds: []int64{dash.Id, anotherDash.Id}}
|
||||
err = GetDashboards(context.Background(), query)
|
||||
@@ -117,7 +117,7 @@ func TestDashboardProvisioningTest(t *testing.T) {
|
||||
OrgId: 1,
|
||||
}
|
||||
|
||||
require.Nil(t, DeleteDashboard(context.Background(), deleteCmd))
|
||||
require.Nil(t, sqlStore.DeleteDashboard(context.Background(), deleteCmd))
|
||||
|
||||
data, err := sqlStore.GetProvisionedDataByDashboardID(dash.Id)
|
||||
require.Nil(t, err)
|
||||
|
||||
Reference in New Issue
Block a user