test(09-03): add failing tests for Winter admin controller scaffolding

- make:admin-controller must emit config_form and config_list beside model fields and columns
- A pre-existing model asset must fail before any controller file is written
This commit is contained in:
Jakub Zych
2026-09-24 18:24:06 +02:00
parent da8828ef38
commit af8e58a038
2 changed files with 161 additions and 0 deletions

View File

@@ -41,6 +41,11 @@ type columnDocument struct {
Select string `yaml:"select"`
}
// CompileList compiles one controller's config_list.yaml and columns.yaml.
func CompileList(pluginID string, ctl pact.AdminController, fsys fs.FS) (*ListSchema, error) {
return compileList(pluginID, ctl, fsys)
}
func compileList(pluginID string, ctl pact.AdminController, fsys fs.FS) (*ListSchema, error) {
dir := strings.Trim(path.Clean(ctl.ConfigDir()), "/")
if dir == "." || strings.HasPrefix(dir, "..") {