merge main
This commit is contained in:
@@ -535,12 +535,12 @@ func (h *provisioningTestHelper) validateManagedDashboardsFolderMetadata(t *test
|
||||
sourcePath, _, _ := unstructured.NestedString(d.Object, "metadata", "annotations", "grafana.app/sourcePath")
|
||||
isNested := strings.Contains(sourcePath, "/")
|
||||
|
||||
folderName, found, _ := unstructured.NestedString(d.Object, "metadata", "annotations", "grafana.app/folder")
|
||||
require.True(t, found, "dashboard will always have a folder annotation")
|
||||
folder, found, _ := unstructured.NestedString(d.Object, "metadata", "annotations", "grafana.app/folder")
|
||||
if isNested {
|
||||
require.NotEmpty(t, folderName, "dashboard should be in a non-empty folder")
|
||||
require.True(t, found, "dashboard should have a folder annotation")
|
||||
require.NotEmpty(t, folder, "dashboard should be in a non-empty folder")
|
||||
} else {
|
||||
require.Equal(t, folderName, "general", "non nested folder is in general")
|
||||
require.False(t, found, "dashboard should not have a folder annotation")
|
||||
}
|
||||
|
||||
managerID, _, _ := unstructured.NestedString(d.Object, "metadata", "annotations", "grafana.app/managerId")
|
||||
|
||||
Reference in New Issue
Block a user