4d3c5d1550
* migrate to v19 * migrate to v18 * Migration to be verified: v17 Convert minSpan to maxPerRow in panels * Migration to be verified: 16 Grid layout migration * Refactor v17 and v19 migrations to use shared helper functions * Migration to be verified: 15 No-op migration for schema consistency * Migration to be verified: 14 Shared crosshair to graph tooltip migration * cleanup * wip * complete migration * fix lint issues * refactor and test with minimal graph config * update tests * extract defaults outside the func * lint * lint * add missing showValues prop * add context and fix latest version * generate snapshots * v13 should be no-op * clean up * remove v28 * remove singlestat migraiton from frontend migrator because this is an automigration * remove unused function * Remove v24 table plugin logic * cleanup * remove plugin version for automigrate as it was used only in v24 and v28 that have been removed * cleanup --------- Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
39 lines
873 B
Go
39 lines
873 B
Go
package schemaversion_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
|
)
|
|
|
|
func TestV13(t *testing.T) {
|
|
tests := []migrationTestCase{
|
|
{
|
|
name: "v13 no-op migration, updates schema version only",
|
|
input: map[string]interface{}{
|
|
"title": "V13 No-Op Migration Test Dashboard",
|
|
"schemaVersion": 12,
|
|
"panels": []interface{}{
|
|
map[string]interface{}{
|
|
"type": "graph",
|
|
"title": "Panel remains unchanged",
|
|
"id": 1,
|
|
},
|
|
},
|
|
},
|
|
expected: map[string]interface{}{
|
|
"title": "V13 No-Op Migration Test Dashboard",
|
|
"schemaVersion": 13,
|
|
"panels": []interface{}{
|
|
map[string]interface{}{
|
|
"type": "graph",
|
|
"title": "Panel remains unchanged",
|
|
"id": 1,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
runMigrationTests(t, tests, schemaversion.V13)
|
|
}
|