Protect validation probes with the session lock
Some checks failed
ci/woodpecker/push/verify Pipeline was canceled

This commit is contained in:
2026-11-30 14:40:34 +00:00
parent fec29b541f
commit 826369c81a
7 changed files with 225 additions and 7 deletions

View File

@@ -230,6 +230,10 @@ func TestSessionValidationReportsPreparedAndProviderFailures(t *testing.T) {
if err == nil || report.Valid || !strings.Contains(err.Error(), "run prepare") || len(fake.PreflightRequests) != 0 {
t.Fatalf("missing evidence: %+v %v", report, err)
}
missingPaths := artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root).SessionPathsFor(cfg.Session.Campaign, cfg.Session.SessionID)
if _, err := os.Lstat(missingPaths.Root); !errors.Is(err, os.ErrNotExist) {
t.Fatalf("missing preparation created a workspace: %v", err)
}
paths := seedValidationPrepared(t, cfg)
failure := errors.New("synthetic provider failure")
fake.PreflightErr = failure