mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 08:22:20 +08:00
Scuemata: Add test to validate devenv resources (#35810)
* Add test for devenv resources * Refactor validation tests for grokkability * Devenv dashboards error-tracking script * Refactor to use cueerrors.Details() * Further test refinement * Close major elements of dashboard schema * Centralize dashboard validation tests General dashboard validation testing belongs in the load package. * Better names for error context on glue CUE code * Fixup validate-resource Do only one of base or dist, and fix copied docs. * Skip the devenv test * Remove test for validateResources * Fix shellcheck * Backend linter Co-authored-by: sam boyer <sdboyer@grafana.com>
This commit is contained in:

committed by
GitHub

parent
8de218d5f1
commit
2e0dc835cf
@ -142,13 +142,18 @@ var cueCommands = []*cli.Command{
|
||||
},
|
||||
{
|
||||
Name: "validate-resource",
|
||||
Usage: "validate *.cue files in the project",
|
||||
Usage: "validate resource files (e.g. dashboard JSON) against schema",
|
||||
Action: runPluginCommand(cmd.validateResources),
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "dashboard",
|
||||
Usage: "dashboard JSON file to validate",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "base-only",
|
||||
Usage: "validate using only base schema, not dist (includes plugin schema)",
|
||||
Value: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user