The 4 v2 scenarios in greet.feature require special config
(FEATURE=greet GODOG_TAGS=@v2) to enable the v2 endpoint via
shouldEnableV2(). Without that config, all v2 scenarios fail
with "v2 endpoint not available".
Two fixes:
1. Tag the 3 untagged v2 scenarios with @v2 @api (one already
had it, others were missing tags)
2. Extend DEFAULT_TAGS in run-bdd-tests.sh to exclude @v2
This makes the default BDD test run pass on CI without v2 setup.
v2 scenarios can still be run explicitly with:
FEATURE=greet GODOG_TAGS=@v2 go test ./features/greet/...
Companion to PR #26 (BDD_SCHEMA_ISOLATION) - both target CI green.
🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Finalize BDD testing framework with:
- Unified step definitions using StepContext struct
- Proper server verification in theServerIsRunning step
- Robust JSON response handling with escaping and newline trimming
- Updated documentation reflecting current implementation
- Test validation script to ensure test quality
- All tests passing with proper black box testing
Key files updated:
- pkg/bdd/steps/steps.go: Unified step definitions
- pkg/bdd/testserver/client.go: Robust response validation
- pkg/bdd/README.md: Godog pattern guide
- doc/BDD_GUIDE.md: Updated usage guide
- adr/0008-bdd-testing.md: Updated ADR with current approach
- scripts/run-bdd-tests.sh: Test validation script
The BDD framework is now production-ready with comprehensive
documentation and proper testing practices.