Verify shared references in run and preflight

This commit is contained in:
2026-11-29 18:18:25 +00:00
parent 03e4c0d64d
commit f05d2e593e
4 changed files with 248 additions and 3 deletions

View File

@@ -622,6 +622,8 @@ func maintainedExampleFiles(t *testing.T) []maintainedExample {
func productionSpellCatalogContractConfig(t *testing.T) string {
t.Helper()
partyPath := writeSharedReference(t, "party.yml", validPartyYAML)
glossaryPath := writeSharedReference(t, "glossary.json", validSharedGlossary)
catalogPath := filepath.Join(t.TempDir(), "spell-catalog.json")
if err := os.WriteFile(catalogPath, []byte(`{"schema_version":"maximumdirect.glossary.v1","collections":{"spells":{"entries":[{"id":"aegis","name":"Aegis of Emberfall","category":"spell","aliases":["Emberfall Aegis"]}]}}}`), 0o600); err != nil {
t.Fatal(err)
@@ -648,7 +650,7 @@ pipelines:
references:
spell_catalog:
path: %q
`, repositoryPath("examples", "dnd-complete", "party.txt"), repositoryPath("examples", "dnd-complete", "glossary.txt"), catalogPath, catalogPath)
`, partyPath, glossaryPath, catalogPath, catalogPath)
}
func writeProductionSpellCatalogContractConfig(t *testing.T) string {