Move dashboard scuemata to grafana-schema (#38470)
* Relocate dashboard scuemata to grafana-schema
* Update assorted tests, vars with dashboard path
* Remove crufty commented var
* Not sure...why that failed
* Remove prefix from base dashboard path var
* Move cue/ui remnants into grafana-schema
* Update import paths in plugin models
* Remove mudball, add package statements
* Remove cuegen.sh
Wooooo we ain't got no codegen
* Revert "Remove mudball, add package statements"
This reverts commit 9bed3098f1.
* Tidy up all the cue files
* Move dashboard scuemata into scuemata/ subdir
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
a19ad25eaa
commit
e61bc33163
@@ -28,11 +28,11 @@ func TestValidateScuemataBasics(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("Testing scuemata validity with invalid cue schemas - family missing", func(t *testing.T) {
|
||||
genCue, err := os.ReadFile("testdata/missing_family_gen.cue")
|
||||
genCue, err := os.ReadFile("testdata/missing_family.cue")
|
||||
require.NoError(t, err)
|
||||
|
||||
filesystem := fstest.MapFS{
|
||||
"cue/data/gen.cue": &fstest.MapFile{Data: genCue},
|
||||
"packages/grafana-schema/src/scuemata/dashboard/dashboard.cue": &fstest.MapFile{Data: genCue},
|
||||
}
|
||||
mergedFS := mergefs.Merge(filesystem, defaultBaseLoadPaths.BaseCueFS)
|
||||
|
||||
@@ -46,11 +46,11 @@ func TestValidateScuemataBasics(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("Testing scuemata validity with invalid cue schemas - panel missing ", func(t *testing.T) {
|
||||
genCue, err := os.ReadFile("testdata/missing_panel_gen.cue")
|
||||
genCue, err := os.ReadFile("testdata/missing_panel.cue")
|
||||
require.NoError(t, err)
|
||||
|
||||
filesystem := fstest.MapFS{
|
||||
"cue/data/gen.cue": &fstest.MapFile{Data: genCue},
|
||||
"packages/grafana-schema/src/scuemata/dashboard/dashboard.cue": &fstest.MapFile{Data: genCue},
|
||||
}
|
||||
mergedFS := mergefs.Merge(filesystem, defaultBaseLoadPaths.BaseCueFS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user