Skip to content

stevenacoffman/testing-legacy

v0.1.0MIT

Go testing practice and legacy code: table tests, helpers, fuzzing, and safe change.

test-helper-process-subprocess-mock

Use when Go code calls exec.Command and tests need to fake the external binary or its failures (non-zero exit, garbage stdout, crash). Inject a command factory and re-run the test binary via TestHelperProcess and GO_WANT_HELPER_PROCESS=1. Not for HTTP services or databases.

Read SKILL.md at the source

Pinned to revision e4081cbb4d29, so it is the text this page describes rather than whatever the author pushed since.

Pre-approved tools experimental

Experimental field. Support varies between clients, so this list is what the author declared, not what your client will enforce.

  • Bash
  • Read
  • Edit

Files

Every link opens the file at its source, pinned to the revision this page describes.