add ready and healthy probe endpoints

This commit is contained in:
Markus Muellner
2022-07-01 10:24:23 +02:00
committed by Benj Fassbind
parent 352f4e8772
commit 2020ca9971
8 changed files with 163 additions and 46 deletions
+27
View File
@@ -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)