Preserve current diagnostics during run cleanup

This commit is contained in:
2026-11-30 01:55:47 +00:00
parent 3118bc35ba
commit 52a5d483e3
6 changed files with 224 additions and 59 deletions

View File

@@ -149,8 +149,11 @@ func TestCleanupFailurePreservesPublishAndRetriesWithoutRepublishing(t *testing.
if !reflect.DeepEqual(summary.Executed, []string{"cleanup"}) || !reflect.DeepEqual(summary.Skipped, []string{"publish", "notify"}) {
t.Fatalf("retry summary = %#v", summary)
}
if _, statErr := os.Lstat(workspaceTarget); !errors.Is(statErr, os.ErrNotExist) {
t.Fatalf("workspace target stat error = %v, want absent", statErr)
if _, statErr := os.Stat(filepath.Join(workspaceTarget, "publish", "logs")); statErr != nil {
t.Fatalf("latest publish diagnostics missing: %v", statErr)
}
if _, statErr := os.Lstat(filepath.Join(workspaceTarget, "extract")); !errors.Is(statErr, os.ErrNotExist) {
t.Fatalf("unprotected extract data remains: %v", statErr)
}
}