Migration v15: No-op migration for schema consistency (#109604)
* 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 * Update v27.go * Update v16.go * cleanup --------- Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com> Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
This commit is contained in:
co-authored by
Haris Rozajac
Haris Rozajac
parent
cace999671
commit
af1b878cb7
@@ -0,0 +1,38 @@
|
||||
package schemaversion_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
||||
)
|
||||
|
||||
func TestV15(t *testing.T) {
|
||||
tests := []migrationTestCase{
|
||||
{
|
||||
name: "v15 no-op migration, updates schema version only",
|
||||
input: map[string]interface{}{
|
||||
"title": "V15 No-Op Migration Test Dashboard",
|
||||
"schemaVersion": 14,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"type": "graph",
|
||||
"title": "Panel remains unchanged",
|
||||
"id": 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"title": "V15 No-Op Migration Test Dashboard",
|
||||
"schemaVersion": 15,
|
||||
"panels": []interface{}{
|
||||
map[string]interface{}{
|
||||
"type": "graph",
|
||||
"title": "Panel remains unchanged",
|
||||
"id": 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
runMigrationTests(t, tests, schemaversion.V15)
|
||||
}
|
||||
Reference in New Issue
Block a user