|
| 1 | +@e2e_group_3 @skip-in-library-mode @Authorized |
| 2 | +Feature: Degraded mode startup |
| 3 | + |
| 4 | + End-to-end scenarios that test LCORE startup behavior when llama-stack |
| 5 | + is NOT available at startup time and allow_degraded_mode is enabled. |
| 6 | + |
| 7 | + These tests verify that LCORE metrics correctly reflect startup state |
| 8 | + in both healthy and degraded modes. |
| 9 | + |
| 10 | + Background: |
| 11 | + Given The service is started locally |
| 12 | + And The system is in default state |
| 13 | + And REST API service prefix is /v1 |
| 14 | + And the Lightspeed stack configuration directory is "tests/e2e/configuration" |
| 15 | + |
| 16 | + Scenario: Degraded mode metric is set to 0.0 when started with llama-stack |
| 17 | + Given The service uses the lightspeed-stack-degraded-mode.yaml configuration |
| 18 | + And The service is restarted |
| 19 | + When I access endpoint "metrics" using HTTP GET method |
| 20 | + Then The status code of the response is 200 |
| 21 | + And The response body contains "ls_started_in_degraded_mode 0.0" |
| 22 | + |
| 23 | + Scenario: Degraded mode metric is set to 1.0 when started without llama-stack |
| 24 | + Given The llama-stack connection is disrupted |
| 25 | + And The service uses the lightspeed-stack-degraded-mode.yaml configuration |
| 26 | + And The service is restarted |
| 27 | + When I access endpoint "metrics" using HTTP GET method |
| 28 | + Then The status code of the response is 200 |
| 29 | + And The response body contains "ls_started_in_degraded_mode 1.0" |
| 30 | + |
| 31 | + Scenario: Readiness endpoint reports degraded state when started without llama-stack |
| 32 | + Given The llama-stack connection is disrupted |
| 33 | + And The service uses the lightspeed-stack-degraded-mode.yaml configuration |
| 34 | + And The service is restarted |
| 35 | + When I access endpoint "readiness" using HTTP GET method |
| 36 | + Then The status code of the response is 503 |
| 37 | + And The body of the response, ignoring the "providers" field, is the following |
| 38 | + """ |
| 39 | + {"ready": false, "reason": "Cannot connect to backend service", "overall_status": "unhealthy", "impacts": ["LLM inference unavailable", "Provider health checks unavailable"]} |
| 40 | + """ |
0 commit comments