Adds a "go_version" field to InfoResponse, populated via runtime.Version(). Useful for ops debugging (which Go version is running in production?). BDD scenario @critical asserts the field is non-empty. Doc + ADR-0026 updated.
46 lines
1.8 KiB
Gherkin
46 lines
1.8 KiB
Gherkin
# features/info/info.feature
|
|
@info @critical
|
|
Feature: Info Endpoint
|
|
The /api/info endpoint should return composite application information
|
|
|
|
@basic @critical
|
|
Scenario: GET /api/info returns all required fields
|
|
Given the server is running
|
|
When I request the info endpoint
|
|
Then the status code should be 200
|
|
And the response should be JSON
|
|
And the response should contain "version"
|
|
And the response should contain "commit_short"
|
|
And the response should contain "build_date"
|
|
And the response should contain "uptime_seconds"
|
|
And the response should contain "cache_enabled"
|
|
And the response should contain "healthz_status"
|
|
And the "healthz_status" field should equal "healthy"
|
|
|
|
@version @critical
|
|
Scenario: version field matches semantic version pattern
|
|
Given the server is running
|
|
When I request the info endpoint
|
|
Then the status code should be 200
|
|
And the "version" field should match /^\d+\.\d+\.\d+$/
|
|
|
|
@cache @skip @bdd-deferred
|
|
Scenario: /api/info is cached when cache is enabled
|
|
# Deferred: the BDD testsetup currently runs with cache disabled
|
|
# (see "Cache service disabled" in test logs). Cache HIT/MISS behavior
|
|
# is covered by unit tests on the cache service. Reopen this scenario
|
|
# if/when the BDD harness gains a cache-enabled mode (likely after
|
|
# ADR-0022 Phase 2).
|
|
Given the server is running with cache enabled
|
|
When I request the info endpoint
|
|
Then the response header "X-Cache" should be "MISS"
|
|
When I request the info endpoint again
|
|
Then the response header "X-Cache" should be "HIT"
|
|
|
|
@go_version @critical
|
|
Scenario: go_version field is non-empty
|
|
Given the server is running
|
|
When I request the info endpoint
|
|
Then the status code should be 200
|
|
And the response should contain "go_version"
|