diff --git a/tests/features/check-service-status.feature b/tests/features/check-service-status.feature index 48c2718d44..2e65318237 100644 --- a/tests/features/check-service-status.feature +++ b/tests/features/check-service-status.feature @@ -8,7 +8,7 @@ Feature: Check status of the service Scenario: I want to check the service health Given I fetch the healthcheck endpoint Then I see JSON output - And it contains a "overall_healthy" key/value pair + And the service is declared healthy @smoke Scenario: I want to discover the service version diff --git a/tests/smoke/context/CommonContext.php b/tests/smoke/context/CommonContext.php index f6eb612b61..95e9c7f372 100644 --- a/tests/smoke/context/CommonContext.php +++ b/tests/smoke/context/CommonContext.php @@ -217,6 +217,17 @@ public function iSeeJsonOutput(): void $this->responseJson = $this->assertJsonResponse(); } + /** + * @Then the service is declared healthy + */ + public function theServiceIsDeclaredHealthy(): void + { + $this->responseJson = $this->assertJsonResponse(); + + $this->itContainsAKeyValuePair('overall_healthy'); + Assert::assertTrue($this->responseJson['overall_healthy']); + } + /** * @Then it contains a :key key\/value pair */