provisioned dashboard validation should not be made from provisioning service

Provisioned dashboard validation should not be made when creating/updating a folder or
when provisioning service are trying to provision/create/update dashboard
This commit is contained in:
Marcus Efraimsson
2018-04-13 17:45:32 +02:00
parent 4f44376564
commit 79d8937ce5
4 changed files with 66 additions and 16 deletions

View File

@@ -108,11 +108,19 @@ func TestFolderService(t *testing.T) {
return nil
})
provisioningValidated := false
bus.AddHandler("test", func(query *models.IsDashboardProvisionedQuery) error {
provisioningValidated = true
return nil
})
Convey("When creating folder should not return access denied error", func() {
err := service.CreateFolder(&models.CreateFolderCommand{
Title: "Folder",
})
So(err, ShouldBeNil)
So(provisioningValidated, ShouldBeFalse)
})
Convey("When updating folder should not return access denied error", func() {
@@ -121,6 +129,7 @@ func TestFolderService(t *testing.T) {
Title: "Folder",
})
So(err, ShouldBeNil)
So(provisioningValidated, ShouldBeFalse)
})
Convey("When deleting folder by uid should not return access denied error", func() {