Document and verify published product imports

This commit is contained in:
2026-12-02 16:49:46 +00:00
parent 56483f9064
commit e5d91cb19b
32 changed files with 330 additions and 265 deletions

View File

@@ -5,6 +5,7 @@ import (
"context"
"os"
"path/filepath"
"slices"
"strings"
"testing"
"time"
@@ -99,7 +100,14 @@ func TestFullRunWithSuppliedTranscriptPreparesAndRendersSelectedVariant(t *testi
if _, err := restoreSessionState(context.Background(), cfg, RestorePlanOptions{}, normalizeCommandDependencies(restoreCommandDependencies(fake))); err != nil {
t.Fatal(err)
}
plan := mustBoundedPlan(t, "", "analyze")
baseline, err := (&manifest.LocalStore{}).Load(context.Background(), manifestPathFor(cfg))
if err != nil {
t.Fatal(err)
}
if baseline.Stages["publish"] != nil || baseline.Stages["cleanup"] != nil {
t.Fatalf("import fabricated publication or cleanup: %#v", baseline.Stages)
}
plan := mustBoundedPlan(t, "", "")
effective, err := resolveEffectiveArtifacts(cfg, nil)
if err != nil {
t.Fatal(err)
@@ -131,6 +139,17 @@ func TestFullRunWithSuppliedTranscriptPreparesAndRendersSelectedVariant(t *testi
}
}
}
current, err := discoverRemotePublication(context.Background(), cfg, fake)
if err != nil {
t.Fatal(err)
}
restorePreview, err := buildInventoryRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{DryRun: true})
if err != nil {
t.Fatal(err)
}
if !slices.Contains(restorePreview.Satisfied, "render") || slices.Contains(restorePreview.Remaining, "render") {
t.Fatalf("restore preview did not preserve reusable local render: %#v", restorePreview)
}
forced := mustBoundedPlan(t, "transcribe", "transcribe")
input := &executionInput{plan: forced}
input.Force.Value = true