Archive Audita reports as polish diagnostics
This commit is contained in:
@@ -44,6 +44,28 @@ func TestCommittedRestorePlanUsesOnlyDeclaredObjects(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCommittedRestoreDoesNotRequirePolishRunDiagnostics(t *testing.T) {
|
||||
cfg := restorePlanConfig(t)
|
||||
fake := &storage.FakeBackend{}
|
||||
current := seedCommittedRestoreSnapshot(t, cfg, fake, "20260519T010203Z-a1b2c3d4", map[string][]byte{
|
||||
"transcripts/full.json": []byte(`{"segments":[]}`),
|
||||
})
|
||||
diagnostic := filepath.Join(cfg.Pipeline.Workspace.Root, "runs", current.RunID, "polish", "outputs", "transcripts", "errors.yml")
|
||||
current.Manifest.Stages["polish"] = &manifest.StageRecord{
|
||||
Name: "polish", Status: manifest.StatusSucceeded,
|
||||
Logs: []string{diagnostic},
|
||||
}
|
||||
plan, err := buildRestorePlan(context.Background(), cfg, current, fake, RestorePlanOptions{})
|
||||
if err != nil {
|
||||
t.Fatalf("buildRestorePlan() error = %v", err)
|
||||
}
|
||||
for _, action := range plan.Actions {
|
||||
if strings.Contains(action.LocalRelativePath, "errors.yml") {
|
||||
t.Fatalf("diagnostic became a required restore target: %#v", action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCommittedRestoreDownloadsCarriedOutputFromDeclaredRun(t *testing.T) {
|
||||
cfg := restorePlanConfig(t)
|
||||
fake := &storage.FakeBackend{}
|
||||
|
||||
Reference in New Issue
Block a user