The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/apps/dashboard/pkg/migration/schemaversion/v32_test.go

38 lines
882 B

package schemaversion_test
import (
"testing"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
)
func TestV32(t *testing.T) {
tests := []migrationTestCase{
{
name: "v32 no-op migration updates schema version only",
input: map[string]interface{}{
"title": "V32 No-Op Migration Test Dashboard",
"schemaVersion": 31,
"panels": []interface{}{
map[string]interface{}{
"type": "timeseries",
"title": "Panel remains unchanged",
"id": 1,
},
},
},
expected: map[string]interface{}{
"title": "V32 No-Op Migration Test Dashboard",
"schemaVersion": 32,
"panels": []interface{}{
map[string]interface{}{
"type": "timeseries",
"title": "Panel remains unchanged",
"id": 1,
},
},
},
},
}
runMigrationTests(t, tests, schemaversion.V32)
}