Provisioning: Fix failure to save dashboard (#81694)
This commit is contained in:
@@ -104,11 +104,35 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
require.ErrorIs(t, err, dashboards.ErrDashboardIdentifierNotSet)
|
||||
})
|
||||
|
||||
t.Run("Should be able to get root dashboard by title", func(t *testing.T) {
|
||||
setup()
|
||||
query := dashboards.GetDashboardQuery{
|
||||
Title: util.Pointer("test dash 67"),
|
||||
FolderUID: util.Pointer(""),
|
||||
OrgID: 1,
|
||||
}
|
||||
|
||||
_, err := dashboardStore.GetDashboard(context.Background(), &query)
|
||||
require.Error(t, err)
|
||||
})
|
||||
|
||||
t.Run("Should be able to get dashboard by title and folderID", func(t *testing.T) {
|
||||
setup()
|
||||
query := dashboards.GetDashboardQuery{
|
||||
Title: util.Pointer("test dash 23"),
|
||||
FolderID: &savedDash.ID,
|
||||
OrgID: 1,
|
||||
}
|
||||
|
||||
_, err := dashboardStore.GetDashboard(context.Background(), &query)
|
||||
require.Error(t, err)
|
||||
})
|
||||
|
||||
t.Run("Should be able to get dashboard by title and folderUID", func(t *testing.T) {
|
||||
setup()
|
||||
query := dashboards.GetDashboardQuery{
|
||||
Title: util.Pointer("test dash 23"),
|
||||
FolderUID: savedFolder.UID,
|
||||
FolderUID: util.Pointer(savedFolder.UID),
|
||||
OrgID: 1,
|
||||
}
|
||||
queryResult, err := dashboardStore.GetDashboard(context.Background(), &query)
|
||||
@@ -160,7 +184,7 @@ func TestIntegrationDashboardDataAccess(t *testing.T) {
|
||||
setup()
|
||||
query := dashboards.GetDashboardQuery{
|
||||
Title: util.Pointer("test dash 23"),
|
||||
FolderUID: "",
|
||||
FolderUID: util.Pointer(""),
|
||||
OrgID: 1,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user