Reconcile reuse and inspection with native extraction
This commit is contained in:
@@ -539,16 +539,16 @@ func TestMaintainedExtractionExamplesPreservePublishedContracts(t *testing.T) {
|
||||
t.Fatalf("load full example error = %v", err)
|
||||
}
|
||||
want := map[string]NotariusOutputConfig{
|
||||
"item_registry": {LaneID: "item-registry", MediaType: "application/json", SchemaID: "notarius.dnd.item_registry", SchemaVersion: "v1", ModuleKey: "dnd/item-registry"},
|
||||
"npc_registry": {LaneID: "npc-registry", MediaType: "application/json", SchemaID: "notarius.dnd.npc_registry", SchemaVersion: "v1", ModuleKey: "dnd/npc-registry"},
|
||||
"location_registry": {LaneID: "location-registry", MediaType: "application/json", SchemaID: "notarius.dnd.location_registry", SchemaVersion: "v1", ModuleKey: "dnd/location-registry"},
|
||||
"scene_descriptions": {LaneID: "scene-descriptions", MediaType: "application/json", SchemaID: "notarius.dnd.scene_descriptions", SchemaVersion: "v1", ModuleKey: "dnd/scene-descriptions"},
|
||||
"item_occurrences": {LaneID: "item-occurrences", MediaType: "application/json", SchemaID: "notarius.dnd.item_occurrences", SchemaVersion: "v1", ModuleKey: "dnd/item-occurrences"},
|
||||
"spells": {LaneID: "spells", MediaType: "application/json", SchemaID: "notarius.dnd.spells", SchemaVersion: "v1", ModuleKey: "dnd/spells"},
|
||||
"combat_turns": {LaneID: "combat-turns", MediaType: "application/json", SchemaID: "notarius.dnd.combat_turns", SchemaVersion: "v1", ModuleKey: "dnd/combat-turns"},
|
||||
"npc_occurrences": {LaneID: "npc-occurrences", MediaType: "application/json", SchemaID: "notarius.dnd.npc_occurrences", SchemaVersion: "v1", ModuleKey: "dnd/npc-occurrences"},
|
||||
"location_occurrences": {LaneID: "location-occurrences", MediaType: "application/json", SchemaID: "notarius.dnd.location_occurrences", SchemaVersion: "v1", ModuleKey: "dnd/location-occurrences"},
|
||||
"enemy_events": {LaneID: "enemy-events", MediaType: "application/json", SchemaID: "notarius.dnd.enemy_events", SchemaVersion: "v1", ModuleKey: "dnd/enemy-events"},
|
||||
"item_registry": {LaneID: "item-registry"},
|
||||
"npc_registry": {LaneID: "npc-registry"},
|
||||
"location_registry": {LaneID: "location-registry"},
|
||||
"scene_descriptions": {LaneID: "scene-descriptions"},
|
||||
"item_occurrences": {LaneID: "item-occurrences"},
|
||||
"spells": {LaneID: "spells"},
|
||||
"combat_turns": {LaneID: "combat-turns"},
|
||||
"npc_occurrences": {LaneID: "npc-occurrences"},
|
||||
"location_occurrences": {LaneID: "location-occurrences"},
|
||||
"enemy_events": {LaneID: "enemy-events"},
|
||||
}
|
||||
if full.Notarius == nil || !reflect.DeepEqual(full.Notarius.Outputs, want) {
|
||||
t.Fatalf("full example outputs = %#v, want %#v", full.Notarius, want)
|
||||
@@ -596,12 +596,13 @@ func writeConfigFiles(t *testing.T, pipelineYAML, sessionYAML string) (string, s
|
||||
if err := os.WriteFile(pipelinePath, []byte(pipelineYAML), 0o644); err != nil {
|
||||
t.Fatalf("write pipeline.yml: %v", err)
|
||||
}
|
||||
campaignYAML := `campaign_id: ` + campaignNameFromSessionYAML(sessionYAML) + `
|
||||
inputs:
|
||||
speakers_file: ./speakers.yml
|
||||
autocorrect_file: ./autocorrect.yml
|
||||
glossary_file: ./glossary.yml
|
||||
party_file: ./party.yml
|
||||
campaignYAML := `schema_version: maximumdirect.rpg.campaign.v1
|
||||
id: ` + campaignNameFromSessionYAML(sessionYAML) + `
|
||||
references: {party: ./party.yml}
|
||||
narratio:
|
||||
inputs:
|
||||
speakers_file: ./speakers.yml
|
||||
glossary_file: ./glossary.yml
|
||||
`
|
||||
if err := os.WriteFile(campaignPath, []byte(campaignYAML), 0o644); err != nil {
|
||||
t.Fatalf("write campaign.yml: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user