Migrate examples to shared native configuration

This commit is contained in:
2026-11-23 03:30:18 +00:00
parent 5e29399705
commit 7870acc492
22 changed files with 97 additions and 31 deletions

View File

@@ -147,3 +147,17 @@ func TestNativeScopesAndHelpUseSharedLoading(t *testing.T) {
}
}
}
func TestMaintainedSecretsExample(t *testing.T) {
t.Setenv("SCRIPTORIUM_EXAMPLE_TOKEN", "")
root, err := filepath.Abs(filepath.Join("..", "..", ".."))
if err != nil {
t.Fatal(err)
}
t.Chdir(root)
var out, diagnostic bytes.Buffer
outcome := Execute(context.Background(), commandkit.Identity{Name: "scriptorium"}, []string{"config", "validate", "--scope=promptkit", "--config=examples/config.secrets.yml"}, &out, &diagnostic)
if outcome.Status != 0 || os.Getenv("SCRIPTORIUM_EXAMPLE_TOKEN") != "" {
t.Fatalf("example: %+v %q", outcome, diagnostic.String())
}
}