mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix capitalising Folder structs (#79207)
* Fix capitalising Folder structs * Add swagger and fix api dashboard test * Add swagger files with bingo installed
This commit is contained in:
@@ -328,7 +328,7 @@ func TestIntegrationCreate(t *testing.T) {
|
||||
buf1 := &bytes.Buffer{}
|
||||
err = json.NewEncoder(buf1).Encode(dashboards.SaveDashboardCommand{
|
||||
Dashboard: dashboardDataOne,
|
||||
FolderUID: folder.Uid,
|
||||
FolderUID: folder.UID,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
u := fmt.Sprintf("http://admin:admin@%s/api/dashboards/db", grafanaListedAddr)
|
||||
@@ -347,7 +347,7 @@ func TestIntegrationCreate(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
assert.NotEmpty(t, m["id"])
|
||||
assert.NotEmpty(t, m["uid"])
|
||||
assert.Equal(t, folder.Uid, m["folderUid"])
|
||||
assert.Equal(t, folder.UID, m["folderUid"])
|
||||
})
|
||||
|
||||
t.Run("create dashboard under folder (using deprecated folder sequential ID) should succeed", func(t *testing.T) {
|
||||
@@ -358,7 +358,7 @@ func TestIntegrationCreate(t *testing.T) {
|
||||
buf1 := &bytes.Buffer{}
|
||||
err = json.NewEncoder(buf1).Encode(dashboards.SaveDashboardCommand{
|
||||
Dashboard: dashboardDataOne,
|
||||
FolderID: folder.Id, // nolint:staticcheck
|
||||
FolderID: folder.ID, // nolint:staticcheck
|
||||
})
|
||||
require.NoError(t, err)
|
||||
u := fmt.Sprintf("http://admin:admin@%s/api/dashboards/db", grafanaListedAddr)
|
||||
@@ -377,7 +377,7 @@ func TestIntegrationCreate(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
assert.NotEmpty(t, m["id"])
|
||||
assert.NotEmpty(t, m["uid"])
|
||||
assert.Equal(t, folder.Uid, m["folderUid"])
|
||||
assert.Equal(t, folder.UID, m["folderUid"])
|
||||
})
|
||||
|
||||
t.Run("create dashboard under unknow folder should fail", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user