Skip to content

Add CONTRIBUTING guide and improve test diagnostics#6

Merged
andrewbelcher merged 1 commit into
mainfrom
improve-test-suite
Jun 22, 2026
Merged

Add CONTRIBUTING guide and improve test diagnostics#6
andrewbelcher merged 1 commit into
mainfrom
improve-test-suite

Conversation

@andrewbelcher

Copy link
Copy Markdown
Contributor

What

  • CONTRIBUTING.md — prerequisites, installing Bats + the bats-assert/bats-file/bats-support helpers (macOS and Linux), running the suite locally, and how CI exercises both stable and HEAD DDEV (including the daily scheduled run that also runs install from release).
  • tests/test.bats:
    • When CI is re-run with debug logging (RUNNER_DEBUG=1), set BATS_VERBOSE_RUN so run prints every command's $output on failure. This surfaces the post-start hook log captured by run ddev restart, which is otherwise swallowed when restart succeeds — exactly what was needed to diagnose a recent HEAD-only failure.
    • Omit the db and ddev-ssh-agent containers (unused by the suite) for a faster project start.

Why

Post-start hook failures are non-fatal in DDEV, so ddev restart exits 0 even when a hook fails. Without verbose output that failure is invisible. Gating BATS_VERBOSE_RUN on RUNNER_DEBUG keeps normal runs quiet but makes a debug re-run show the hook log, with no change to how the ddev test action invokes bats.

🤖 Generated with Claude Code

- Add CONTRIBUTING.md documenting prerequisites, installing Bats + helper
  libraries, running the suite, and how CI (incl. the daily scheduled run)
  exercises stable and HEAD DDEV.
- test.bats: when CI is re-run with debug logging (RUNNER_DEBUG=1), set
  BATS_VERBOSE_RUN so `run` prints every command's $output on failure. This
  surfaces the post-start hook log captured by `run ddev restart`, which is
  otherwise swallowed when restart succeeds.
- test.bats: omit the db and ddev-ssh-agent containers, which the suite doesn't
  use, for faster project start.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andrewbelcher andrewbelcher enabled auto-merge (squash) June 22, 2026 12:52
@andrewbelcher andrewbelcher merged commit d66b5ef into main Jun 22, 2026
2 checks passed
@andrewbelcher andrewbelcher deleted the improve-test-suite branch June 22, 2026 12:56
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