diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2019-04-05 08:16:39 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2019-04-05 08:28:34 +0800 |
commit | 0c885a116ca1d5764e52a5c7a90d31fb777a3ba4 (patch) | |
tree | d771b68e293222b31d68d0342f53f98184df346d | |
parent | 0842702d71ea464b7e7a33c15253fddd5170ee56 (diff) |
Update health check for catalog
Change-Id: Id8d4bfa1f8d11f7e6ce280484e385249ce724d00
Issue-ID: VFC-1306
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | catalog/packages/tests/test_health_check.py | 20 | ||||
-rwxr-xr-x | catalog/packages/urls.py | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/catalog/packages/tests/test_health_check.py b/catalog/packages/tests/test_health_check.py index 8c06fc99..f8c3b56b 100644 --- a/catalog/packages/tests/test_health_check.py +++ b/catalog/packages/tests/test_health_check.py @@ -25,8 +25,26 @@ class TestHealthCheck(TestCase): def tearDown(self): pass - def test_health_check(self): + def test_vnfpkgm_health_check(self): response = self.client.get("/api/vnfpkgm/v1/health_check") self.assertEqual(status.HTTP_200_OK, response.status_code, response.content) resp_data = json.loads(response.content) self.assertEqual({"status": "active"}, resp_data) + + def test_nsd_health_check(self): + response = self.client.get("/api/nsd/v1/health_check") + self.assertEqual(status.HTTP_200_OK, response.status_code, response.content) + resp_data = json.loads(response.content) + self.assertEqual({"status": "active"}, resp_data) + + def test_catalog_health_check(self): + response = self.client.get("/api/catalog/v1/health_check") + self.assertEqual(status.HTTP_200_OK, response.status_code, response.content) + resp_data = json.loads(response.content) + self.assertEqual({"status": "active"}, resp_data) + + def test_parser_health_check(self): + response = self.client.get("/api/parser/v1/health_check") + self.assertEqual(status.HTTP_200_OK, response.status_code, response.content) + resp_data = json.loads(response.content) + self.assertEqual({"status": "active"}, resp_data) diff --git a/catalog/packages/urls.py b/catalog/packages/urls.py index 16273813..776e940e 100755 --- a/catalog/packages/urls.py +++ b/catalog/packages/urls.py @@ -70,4 +70,7 @@ urlpatterns = [ # health check url(r'^api/vnfpkgm/v1/health_check$', HealthCheckView.as_view()), + url(r'^api/nsd/v1/health_check$', HealthCheckView.as_view()), + url(r'^api/catalog/v1/health_check$', HealthCheckView.as_view()), + url(r'^api/parser/v1/health_check$', HealthCheckView.as_view()), ] |