🐛 fix(bdd): shouldEnableV2 wrongly matched ~@v2 as @v2 substring + new gate regression scenario (#57)
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user