provisioning: simplify db query

the GetProvisionedDashboardQuery wasent used for anything
else than check if a dashboard is provisioned or not. So
we simplified this query to make it more maintainable.
This commit is contained in:
bergquist
2018-04-10 12:30:37 +02:00
parent 0f9b592428
commit 949484b949
8 changed files with 41 additions and 53 deletions

View File

@@ -27,8 +27,9 @@ func TestIntegratedDashboardService(t *testing.T) {
return nil
})
bus.AddHandler("test", func(cmd *models.GetProvisionedDashboardByDashboardId) error {
return models.ErrDashboardProvisioningDoesNotExist
bus.AddHandler("test", func(cmd *models.IsDashboardProvisionedQuery) error {
cmd.Result = false
return nil
})
savedFolder := saveTestFolder("Saved folder", testOrgId)