diff --git a/pkg/registry/apis/provisioning/resources/dualwriter.go b/pkg/registry/apis/provisioning/resources/dualwriter.go index 673370b3820..fe8ad152f9b 100644 --- a/pkg/registry/apis/provisioning/resources/dualwriter.go +++ b/pkg/registry/apis/provisioning/resources/dualwriter.go @@ -539,7 +539,7 @@ func (r *DualReadWriter) authorizeCreateFolder(ctx context.Context, _ string) er func (r *DualReadWriter) deleteFolder(ctx context.Context, opts DualWriteOptions) (*ParsedResource, error) { // if the ref is set, it is not the active branch, so just delete the files from the branch // and do not delete the items from grafana itself - if r.shouldUpdateGrafanaDB(opts, nil) { + if !r.shouldUpdateGrafanaDB(opts, nil) { err := r.repo.Delete(ctx, opts.Path, opts.Ref, opts.Message) if err != nil { return nil, fmt.Errorf("error deleting folder from repository: %w", err) diff --git a/pkg/tests/apis/provisioning/files_test.go b/pkg/tests/apis/provisioning/files_test.go index 455a59def07..3eed9171578 100644 --- a/pkg/tests/apis/provisioning/files_test.go +++ b/pkg/tests/apis/provisioning/files_test.go @@ -20,8 +20,6 @@ import ( ) func TestIntegrationProvisioning_DeleteResources(t *testing.T) { - // TODO: fix - t.Skip("Skipping this test while being worked on") testutil.SkipIntegrationTestInShortMode(t) helper := runGrafana(t)