mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
add ready and healthy probe endpoints
This commit is contained in:
committed by
Benj Fassbind
parent
352f4e8772
commit
2020ca9971
@@ -0,0 +1,27 @@
|
||||
from api_lib import APITest
|
||||
|
||||
|
||||
class ReadyAPITest(APITest):
|
||||
"""
|
||||
GET /ready
|
||||
"""
|
||||
|
||||
def check(self):
|
||||
resp = self.get("/api/ready")
|
||||
self.check_equal(resp.status_code, 200)
|
||||
|
||||
readyStatus = "{\"Status\":\"Aptly is ready\"}"
|
||||
self.check_equal(readyStatus, resp.text)
|
||||
|
||||
|
||||
class HealthyAPITest(APITest):
|
||||
"""
|
||||
GET /healthy
|
||||
"""
|
||||
|
||||
def check(self):
|
||||
resp = self.get("/api/healthy")
|
||||
self.check_equal(resp.status_code, 200)
|
||||
|
||||
healthyStatus = "{\"Status\":\"Aptly is healthy\"}"
|
||||
self.check_equal(healthyStatus, resp.text)
|
||||
Reference in New Issue
Block a user