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 16:10:03 +02:00
committed by GitHub
parent e7b800f35a
commit 08205d64d1
8 changed files with 36 additions and 25 deletions

View File

@ -8,11 +8,12 @@ import (
"github.com/grafana/grafana/pkg/util"
"github.com/google/go-cmp/cmp"
"github.com/grafana/grafana/pkg/web"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/web"
)
func TestPatchLibraryElement(t *testing.T) {
func TestIntegration_PatchLibraryElement(t *testing.T) {
scenarioWithPanel(t, "When an admin tries to patch a library panel that does not exist, it should fail",
func(t *testing.T, sc scenarioContext) {
cmd := model.PatchLibraryElementCommand{Kind: int64(model.PanelElement), Version: 1}