Chore: Remove dashboard version from models (#50287)

* Remove dashbpard version from models

* Fix lint

* Fix api & sqlstore tests

* Remove integration tags

* Fix lint again

* Add integration test to correct namespace

* Lont fix 2

* Change Id to ID in dashVersionMeta
This commit is contained in:
idafurjes
2022-06-08 12:22:55 +02:00
committed by GitHub
parent a938ae1d9e
commit e9f8d582c8
11 changed files with 44 additions and 135 deletions
@@ -54,7 +54,7 @@ func TestIntegrationGetDashboardVersion(t *testing.T) {
_, err := dashVerStore.Get(context.Background(), &query)
require.Error(t, err)
assert.Equal(t, models.ErrDashboardVersionNotFound, err)
assert.Equal(t, dashver.ErrDashboardVersionNotFound, err)
})
}
@@ -165,8 +165,8 @@ func insertTestDashboard(t *testing.T, sqlStore *sqlstore.SQLStore, title string
dash.Data.Set("uid", dash.Uid)
err = sqlStore.WithDbSession(context.Background(), func(sess *sqlstore.DBSession) error {
dashVersion := &models.DashboardVersion{
DashboardId: dash.Id,
dashVersion := &dashver.DashboardVersion{
DashboardID: dash.Id,
ParentVersion: dash.Version,
RestoredFrom: cmd.RestoredFrom,
Version: dash.Version,
@@ -227,8 +227,8 @@ func updateTestDashboard(t *testing.T, sqlStore *sqlstore.SQLStore, dashboard *m
require.Nil(t, err)
err = sqlStore.WithDbSession(context.Background(), func(sess *sqlstore.DBSession) error {
dashVersion := &models.DashboardVersion{
DashboardId: dash.Id,
dashVersion := &dashver.DashboardVersion{
DashboardID: dash.Id,
ParentVersion: parentVersion,
RestoredFrom: cmd.RestoredFrom,
Version: dash.Version,