merge main

This commit is contained in:
Ryan McKinley
2025-12-22 13:48:53 +03:00
parent 4c39335c6d
commit dfed7ae90c
+4 -4
View File
@@ -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")