libraryelements: Spanner compability (#103881)

* libraryelements: fix compatibility with Spanner

* Log errors leading to status code 500.

* Rename tests to make them integration tests.
This commit is contained in:
Peter Štibraný
2025-04-24 14:10:03 +00:00
committed by GitHub
parent e7b800f35a
commit 08205d64d1
8 changed files with 36 additions and 25 deletions
@@ -4,15 +4,16 @@ import (
"encoding/json"
"testing"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/libraryelements/model"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/web"
"github.com/stretchr/testify/require"
)
func TestDeleteLibraryElement(t *testing.T) {
func TestIntegration_DeleteLibraryElement(t *testing.T) {
scenarioWithPanel(t, "When an admin tries to delete a library panel that does not exist, it should fail",
func(t *testing.T, sc scenarioContext) {
resp := sc.service.deleteHandler(sc.reqContext)