grafana/pkg/schema/testdata/trimapplydefaults/test2
ying-jeanne a7ea0ca849
refactory to move trim/apply default into schema.go (#33754)
* refactory to move trim/apply default into schema.go

* fix comments

* move schema test outside of load folder
2021-05-12 15:38:00 +08:00

41 lines
637 B
Plaintext

Verifies common usecases for trimdefault/applydefault functions:
* Basic cases
* Real dashboard
-- CUE --
{
timepicker?: {
collapse: bool | *false
enable: bool | *true
hidden: bool | *false
refresh_intervals: [...string] | *["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
}
}
-- Full --
{
"timepicker": {
"collapse": true,
"enable":true,
"hidden":false,
"refresh_intervals":[
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
}
}
-- Trimed --
{
"timepicker": {
"collapse": true
}
}