mirror of https://github.com/grafana/grafana
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>pull/36324/head^2
parent
8de218d5f1
commit
2e0dc835cf
@ -0,0 +1,11 @@ |
||||
#!/bin/bash |
||||
|
||||
# Temporary - remove this script once the dashboard schema are mature |
||||
|
||||
# Remove the appropriate ellipses from the schema to check for unspecified |
||||
# fields in the artifacts (validating "open") |
||||
|
||||
# Run from root of grafana repo |
||||
CMD=${CLI:-bin/darwin-amd64/grafana-cli} |
||||
FILES=$(grep -rl '"schemaVersion": 30' devenv) |
||||
for DASH in ${FILES}; do echo "${DASH}"; ${CMD} cue validate-resource --dashboard "${DASH}"; done |
Loading…
Reference in new issue