Merge pull request #9625 from ywk253100/191028_e2e

Add e2e test case for health check API
This commit is contained in:
Wang Yan 2019-11-05 14:34:36 +08:00 committed by GitHub
commit 5961c4d72a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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