Skip to content

feat: testing audit of dockerize (plan): find untested risky code - #354

Merged
jwilder merged 10 commits into
masterfrom
testing-audit-2026-10-16
Oct 17, 2026
Merged

jwilder merged 10 commits into
masterfrom
testing-audit-2026-10-16

Conversation

@jwilder

@jwilder jwilder commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

Fix 7 findings from the Testing audit (testing v1) at d9fd48f, each in a small, easy-to-review step with a test. Make the test suite something to trust: risky code is covered, every test can fail, and the suite is fast and stable enough that people run it. Unticked findings stay in the backlog for a later run.

What changes

  • Add test helpers that reset package globals and run log.Fatalf cases in a subprocess
  • Stop waitForHTTP from using a nil request after NewRequest fails, and test its retry paths
  • Test waitForDependencies timeout, unsupported scheme and unix socket paths
  • Test parseConfigFromFlags, startCommand, startTailers and main's usage/version paths
  • Test template error paths with subprocess cases
  • Test tailFile on a file created later, a named pipe and poll mode
  • Make the signal kill timeout injectable and test signal delivery and the kill fallback
  • Address the pre-PR gate's round 1

Testing

Every step adds a test that fails before its fix (or shows the finding no longer reproduces) and runs the project's full existing test suite. A refactor step keeps behaviour, so the existing tests prove it.

…bprocess

Add resetGlobals to snapshot and restore the package globals tests mutate,
replacing hand-written save/restore in the wait, template and process tests.
Add runFatalCase, which re-runs a test binary to check log.Fatalf paths.
Mark tests that touch no globals as parallel.
Make the kill timeout in signalProcessWithTimeout a package variable so
tests can shorten it. Replace the Signal(0)-only test with cases that
check SIGTERM is delivered and that a process ignoring TERM is killed
with SIGKILL after the timeout.
@jwilder
jwilder merged commit cb699b8 into master Oct 17, 2026
12 checks passed
@jwilder
jwilder deleted the testing-audit-2026-10-16 branch October 17, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant