beads/internal/testutil/integration
Jim Wordelman 8d6671b73a
fix(testutil): stop masking build failures as a misleading chmod ENOENT error (#6715)
* test(integration): red — Fix: SubprocessRunner.Build masks every build failure as a chmod ENOENT (refs be-4ecr4)

* feat(integration): green — Fix: SubprocessRunner.Build masks every build failure as a chmod ENOENT (refs be-4ecr4)

* fix(integration): stop orphaning the harness test's temp dir, pin the stdout half

Maintainer review fixups for PR #6715 (be-4ecr4), both minor:

- TestBuildErrorIsMaskedByChmod passes a synthetic *testing.T to Build, which
  the framework never finalizes, so the Cleanup that its t.TempDir() registers
  never ran and every execution orphaned a directory under $TMPDIR (measured:
  one new /tmp entry per run). Remove the mkdtemp parent from the real t —
  TempDir hands back <parent>/001, so deleting the binary's own directory would
  leave the parent behind — guarded to a proper descendant of $TMPDIR so a
  future layout change skips rather than deletes something we did not create.

- The PR makes two changes but pinned only one. Removing build.Stdout left all
  three assertions satisfied, so the stdout capture could silently regress.
  Assert on "[setup failed]", which `go test -c` demonstrably emits on stdout
  in this scenario; the "stdout:" label would be a vacuous pin because it lives
  in the format string and survives an unattached buffer. Verified by
  counterfactual: dropping the wiring now reddens the test, and dropping the
  early return still reddens it for the original masking reason.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-26 04:58:23 -07:00
..
corruption.go test: add multi-process concurrency and server lifecycle integration tests 2026-03-22 15:01:45 -07:00
diagnostics.go test: add multi-process concurrency and server lifecycle integration tests 2026-03-22 15:01:45 -07:00
harness.go fix(testutil): stop masking build failures as a misleading chmod ENOENT error (#6715) 2026-09-26 04:58:23 -07:00
harness_test.go fix(testutil): stop masking build failures as a misleading chmod ENOENT error (#6715) 2026-09-26 04:58:23 -07:00