mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
K8s: Dashboards: Set message as annotation (#99230)
This commit is contained in:
committed by
GitHub
parent
b309c5daed
commit
1a2a284972
@@ -1761,6 +1761,7 @@ func TestLegacySaveCommandToUnstructured(t *testing.T) {
|
||||
t.Run("successfully converts save command to unstructured", func(t *testing.T) {
|
||||
cmd := &dashboards.SaveDashboardCommand{
|
||||
FolderUID: "folder-uid",
|
||||
Message: "saving this dashboard",
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{"test": "test", "title": "testing slugify", "uid": "test-uid"}),
|
||||
}
|
||||
|
||||
@@ -1771,7 +1772,7 @@ func TestLegacySaveCommandToUnstructured(t *testing.T) {
|
||||
assert.Equal(t, "test-namespace", result.GetNamespace())
|
||||
spec := result.Object["spec"].(map[string]any)
|
||||
assert.Equal(t, spec["version"], 1)
|
||||
assert.Equal(t, result.GetAnnotations(), map[string]string{utils.AnnoKeyFolder: "folder-uid"})
|
||||
assert.Equal(t, result.GetAnnotations(), map[string]string{utils.AnnoKeyFolder: "folder-uid", utils.AnnoKeyMessage: "saving this dashboard"})
|
||||
})
|
||||
|
||||
t.Run("should increase version when called", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user