Commit graph

4 commits

Author SHA1 Message Date
Pablo LION
76aec3cc55
refactor(testutil): expand Dolt readiness to 5-state enum (#2304)
* refactor(testutil): consolidate Dolt readiness into enum

Expand from 3-state to 5-state doltReadiness enum:
- doltNoDocker (renamed from doltNoDaemon for clarity)
- doltNoImage (no image at all)
- doltWrongVersion (repo cached but wrong tag)
- doltSkipped (explicit BEADS_TEST_SKIP=dolt opt-out)
- doltReady

Add isDoltRepoImageCached() to distinguish "no image" from "wrong
version". Add hasTestSkip() for comma-separated BEADS_TEST_SKIP
parsing. Silent skip for explicit opt-out avoids ~1s docker info
overhead.

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

* docs: clarify scope of ddfc5e94

ddfc5e94 title says "consolidate" but actually expands the design:

Code changes (internal/testutil/testdoltserver.go):
- Expand doltReadiness enum from 3 to 5 states
- Rename doltNoDaemon → doltNoDocker (clarity)
- Add doltWrongVersion state (image repo cached, wrong tag)
- Add doltSkipped state (explicit opt-out)
- Introduce BEADS_TEST_SKIP env var (comma-separated service list)
  replacing the owner's implicit Docker-only detection with an
  explicit opt-out mechanism that skips the ~1s docker info cost
- Add isDoltRepoImageCached() helper (docker images <repo> -q)
- Add hasTestSkip(service) helper (parses BEADS_TEST_SKIP)
- Extract doltDockerRepo package var to deduplicate strings.Cut
- Silent skip for doltSkipped (no WARN in StartTestDoltServer)

Documentation (docs/TESTING.md):
- Add 5-state readiness table
- Document BEADS_TEST_SKIP usage and evaluation order

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 03:55:54 -08:00
David Ahmann
10edfa9894 docs+tooling: standardize CGO test workflow and ICU setup 2026-02-10 10:56:12 -05:00
Steve Yegge
25061ea9a7 chore: code health review - test fix and error comments (bd-9g1z, bd-ork0)
- Remove TestFindJSONLPathDefault from .test-skip (now passes)
- Add explanatory comments to 24 ignored error locations in cmd/bd:
  - Cobra flag methods (MarkHidden, MarkRequired, MarkDeprecated)
  - Best-effort cleanup/close operations
  - Process signaling operations

Part of code health review epic bd-tggf.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 21:30:57 -08:00
Steve Yegge
0040e8029b feat: Add test infrastructure with automatic skip list
Overview: Added comprehensive test infrastructure to handle the large
test suite (41K LOC, 313 tests in cmd/bd alone) with automatic skipping
of known broken tests.

Changes:
- .test-skip: List of broken tests to skip (with GH issue references)
- scripts/test.sh: Smart test runner that auto-skips broken tests
- docs/TESTING.md: Comprehensive testing guide
- .claude/test-strategy.md: Quick reference for AI agents
- Updated Makefile to use new test script

Known Issues Filed:
- GH #355: TestFallbackToDirectModeEnablesFlush (database deadlock)
- GH #356: TestFindJSONLPathDefault (wrong JSONL filename)

Performance: 3min total (180s compilation, 3.8s execution)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 22:43:04 -05:00