Skip to content

Commit

Permalink
Merge pull request goharbor#9625 from ywk253100/191028_e2e
Browse files Browse the repository at this point in the history
Add e2e test case for health check API
  • Loading branch information
wy65701436 authored Nov 5, 2019
2 parents 473b453 + e20b538 commit 5961c4d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/apitests/python/test_health_check.py
Original file line number Diff line number Diff line change
@@ -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()
2 changes: 2 additions & 0 deletions tests/robot-cases/Group0-BAT/API_DB.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5961c4d

Please sign in to comment.