Scuemata: Add grafana-cli command to validate basic scuemata (#33523)

* Add grafana-cli command to validate basic scuemata

* Fix c/p outdated message

* Fix linting - naming

* Add basic testing

* Add cue schema validation

* Add tests

* Fix linting errors

* Remove code - refactored tests

* Remove unnecessary files - leftovers

* Fix linting

* Try adding public folder in testdata
This commit is contained in:
Dimitris Sotirakis
2021-05-06 18:21:08 +02:00
committed by GitHub
parent 03e91eb1a6
commit 47af158ddb
15 changed files with 787 additions and 0 deletions
+13
View File
@@ -134,6 +134,14 @@ var adminCommands = []*cli.Command{
},
}
var cueCommands = []*cli.Command{
{
Name: "validate-schema",
Usage: "validate *.cue files in the project",
Action: runPluginCommand(cmd.validateScuemataBasics),
},
}
var Commands = []*cli.Command{
{
Name: "plugins",
@@ -145,4 +153,9 @@ var Commands = []*cli.Command{
Usage: "Grafana admin commands",
Subcommands: adminCommands,
},
{
Name: "cue",
Usage: "Cue validation commands",
Subcommands: cueCommands,
},
}