Protect validation probes with the session lock
Some checks failed
ci/woodpecker/push/verify Pipeline was canceled
Some checks failed
ci/woodpecker/push/verify Pipeline was canceled
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user