Library elements: Remove ability to set as "library variable" (#106594)
This commit is contained in:
@@ -114,7 +114,7 @@ func TestIntegration_DeleteLibraryPanelsInFolder(t *testing.T) {
|
||||
scenarioWithPanel(t, "When an admin tries to delete a folder that contains disconnected elements, it should delete all disconnected elements too",
|
||||
func(t *testing.T, sc scenarioContext) {
|
||||
// nolint:staticcheck
|
||||
command := getCreateVariableCommand(sc.folder.ID, sc.folder.UID, "query0")
|
||||
command := getCreatePanelCommand(sc.folder.ID, sc.folder.UID, "query0")
|
||||
sc.reqContext.Req.Body = mockRequestBody(command)
|
||||
resp := sc.service.createHandler(sc.reqContext)
|
||||
require.Equal(t, 200, resp.Status())
|
||||
@@ -292,19 +292,6 @@ func getCreatePanelCommand(folderID int64, folderUID string, name string) model.
|
||||
return command
|
||||
}
|
||||
|
||||
func getCreateVariableCommand(folderID int64, folderUID, name string) model.CreateLibraryElementCommand {
|
||||
command := getCreateCommandWithModel(folderID, folderUID, name, model.VariableElement, []byte(`
|
||||
{
|
||||
"datasource": "${DS_GDEV-TESTDATA}",
|
||||
"name": "query0",
|
||||
"type": "query",
|
||||
"description": "A description"
|
||||
}
|
||||
`))
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
func getCreateCommandWithModel(folderID int64, folderUID, name string, kind model.LibraryElementKind, byteModel []byte) model.CreateLibraryElementCommand {
|
||||
command := model.CreateLibraryElementCommand{
|
||||
FolderUID: &folderUID,
|
||||
|
||||
Reference in New Issue
Block a user