Add e2e test case for health check API

Add e2e test case for health check API

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin 2019-10-28 14:59:47 +08:00
parent 5c4c04a122
commit e20b538141
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# coding: utf-8
from __future__ import absolute_import
import unittest
import testutils
class TestHealthCheck(unittest.TestCase):
def testHealthCheck(self):
client = testutils.GetProductApi("admin", "Harbor12345")
status, code, _ = client.health_get_with_http_info()
self.assertEqual(code, 200)
self.assertEqual("healthy", status.status)
if __name__ == '__main__':
unittest.main()

View File

@ -57,4 +57,6 @@ Test Case - Project Level CVE Whitelist
Harbor API Test ./tests/apitests/python/test_project_level_cve_whitelist.py
Test Case - Tag Retention
Harbor API Test ./tests/apitests/python/test_retention.py
Test Case - Health Check
Harbor API Test ./tests/apitests/python/test_health_check.py