1- # Feature: Health endpoint API tests
2- #TODO: fix test
3-
4- # Background:
5- # Given The service is started locally
6- # And REST API service hostname is localhost
7- # And REST API service port is 8080
8- # And REST API service prefix is /v1
9-
10-
11- # Scenario: Check if service report proper readiness state
12- # Given The system is in default state
13- # When I access endpoint "readiness" using HTTP GET method
14- # Then The status code of the response is 200
15- # And The body of the response has the following schema
16- # """
17- # {
18- # "ready": "bool",
19- # "reason": "str",
20- # "providers": "list[str]"
21- # }
22- # """
23- # And The body of the response is the following
24- # """
25- # {"ready": true, "reason": "All providers are healthy", "providers": []}
26- # """
27-
28- # Scenario: Check if service report proper readiness state when llama stack is not available
29- # Given The system is in default state
30- # And The llama-stack connection is disrupted
31- # When I access endpoint "readiness" using HTTP GET method
32- # Then The status code of the response is 503
33-
34- # Scenario: Check if service report proper liveness state
35- # Given The system is in default state
36- # When I access endpoint "liveness" using HTTP GET method
37- # Then The status code of the response is 200
38- # And The body of the response has the following schema
39- # """
40- # {
41- # "alive": "bool"
42- # }
43- # """
44- # And The body of the response is the following
45- # """
46- # {"alive":true}
47- # """
48-
49- # Scenario: Check if service report proper liveness state when llama stack is not available
50- # Given The system is in default state
51- # And The llama-stack connection is disrupted
52- # When I access endpoint "liveness" using HTTP GET method
53- # Then The status code of the response is 503
1+ Feature : REST API tests
2+
3+
4+ Background :
5+ Given The service is started locally
6+ And REST API service hostname is localhost
7+ And REST API service port is 8080
8+ And REST API service prefix is /v1
9+
10+
11+ Scenario : Check if service report proper readiness state
12+ Given The system is in default state
13+ When I access endpoint "readiness" using HTTP GET method
14+ Then The status code of the response is 200
15+ And The body of the response has the following schema
16+ """
17+ {
18+ "ready": "bool",
19+ "reason": "str",
20+ "providers": "list[str]"
21+ }
22+ """
23+ And The body of the response is the following
24+ """
25+ {"ready": true, "reason": "All providers are healthy", "providers": []}
26+ """
27+
28+
29+ Scenario : Check if service report proper liveness state
30+ Given The system is in default state
31+ When I access endpoint "liveness" using HTTP GET method
32+ Then The status code of the response is 200
33+ And The body of the response has the following schema
34+ """
35+ {
36+ "alive": "bool"
37+ }
38+ """
39+ And The body of the response is the following
40+ """
41+ {"alive": true}
42+ """
43+
44+
45+ Scenario : Check if service report proper readiness state when llama stack is not available
46+ Given The system is in default state
47+ And The llama-stack connection is disrupted
48+ When I access endpoint "readiness" using HTTP GET method
49+ Then The status code of the response is 503
50+ And The body of the response, ignoring the "providers" field, is the following
51+ """
52+ {"ready": false, "reason": "Providers not healthy: unknown"}
53+ """
54+
55+
56+ Scenario : Check if service report proper liveness state even when llama stack is not available
57+ Given The system is in default state
58+ And The llama-stack connection is disrupted
59+ When I access endpoint "liveness" using HTTP GET method
60+ Then The status code of the response is 200
61+ And The body of the response is the following
62+ """
63+ {"alive": true}
64+ """
0 commit comments