🐛 fix(bdd): shouldEnableV2 wrongly matched ~@v2 as @v2 substring + new gate regression scenario (#57)
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 14s
CI/CD Pipeline / CI Pipeline (push) Failing after 6m31s
CI/CD Pipeline / Trigger Docker Push (push) Has been skipped

Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
This commit was merged in pull request #57.
This commit is contained in:
2026-05-05 10:38:08 +02:00
committed by arcodange
parent de5b599455
commit 3b4b40c1cf
2 changed files with 30 additions and 4 deletions

View File

@@ -15,6 +15,16 @@ Feature: Greet Service
When I request a greeting for "John"
Then the response should be "{\"message\":\"Hello John!\"}"
@critical @v2-gate
Scenario: v2 endpoint returns 404 when api.v2_enabled is disabled
# In the default tag-filter run (~@v2), the test server starts with
# v2_enabled=false. The v2EnabledGate middleware (ADR-0023 Phase 4)
# returns 404 with a JSON body explaining the flag state.
Given the server is running
When I send a POST request to v2 greet with name "John"
Then the status code should be 404
And the response should contain "v2 API is currently disabled"
@v2 @api
Scenario: v2 greeting with JSON POST request
Given the server is running with v2 enabled