Update examples and tests for shared glossaries
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/audita"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/scriptorium"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
||||
@@ -20,6 +21,7 @@ import (
|
||||
|
||||
func TestAssembledFullRunUsesCanonicalOrder(t *testing.T) {
|
||||
cfg := testConfig(t)
|
||||
seedGlossaryManifest(t, cfg)
|
||||
canonical := []string{
|
||||
"prepare", "transcribe", "merge", "polish", "normalize", "trim",
|
||||
"render", "extract", "analyze", "publish", "notify", "cleanup",
|
||||
@@ -29,7 +31,7 @@ func TestAssembledFullRunUsesCanonicalOrder(t *testing.T) {
|
||||
for _, name := range canonical {
|
||||
stages = append(stages, resultStage{name: name, result: &stage.StageResult{}, order: &order})
|
||||
}
|
||||
summary, err := executeStages(context.Background(), cfg, stages, RunOptions{})
|
||||
summary, err := executeStages(context.Background(), cfg, stages, RunOptions{Env: &Env{Audita: &audita.FakeRunner{}}})
|
||||
if err != nil {
|
||||
t.Fatalf("executeStages() error = %v", err)
|
||||
}
|
||||
@@ -323,6 +325,7 @@ func TestAssembledSplitBundleProfileSwitchRecordsProvenanceAndLimitsReuse(t *tes
|
||||
providers := make([]stage.SemanticConfigFingerprinter, len(names))
|
||||
seed := manifest.New(production.Session.SessionID, time.Now().UTC())
|
||||
seed.Campaign = production.Session.Campaign
|
||||
seedGlossaryRecords(t, workspace, seed)
|
||||
for _, candidate := range stage.All() {
|
||||
seed.MarkStageSucceeded(candidate.Name(), time.Now().UTC(), nil)
|
||||
}
|
||||
@@ -352,7 +355,7 @@ func TestAssembledSplitBundleProfileSwitchRecordsProvenanceAndLimitsReuse(t *tes
|
||||
|
||||
testingRuns := make([]int, len(names))
|
||||
testingStages := assembledSemanticStages(names, providers, testingRuns)
|
||||
testingSummary, err := executeStages(context.Background(), testingCfg, testingStages, RunOptions{Env: &Env{Scriptorium: &scriptorium.FakeRunner{}}})
|
||||
testingSummary, err := executeStages(context.Background(), testingCfg, testingStages, RunOptions{Env: &Env{Audita: &audita.FakeRunner{}, Scriptorium: &scriptorium.FakeRunner{}}})
|
||||
if err != nil {
|
||||
t.Fatalf("switch to testing profile: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user