summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/opnfv_testapi/tests
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-22 17:10:35 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-22 17:10:35 +0800
commit1610dc693ecee88a4fe5f8a2127e31386c39c923 (patch)
treefc608c16504a8760b2b57287962cd4abc9594b29 /utils/test/result_collection_api/opnfv_testapi/tests
parent9f7616b1e09a5d1aa2828f91c2b6f0e534e7a85f (diff)
Remove Brhamaputra dashboard process from testapi
Now, ELK is the framework used for dashboarding JIRA: FUNCTEST-489 Change-Id: I51e8bc83e7309a226515f603eb4c468b7e7a69bd Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/opnfv_testapi/tests')
-rw-r--r--utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py78
-rw-r--r--utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py20
2 files changed, 0 insertions, 98 deletions
diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py
deleted file mode 100644
index 27ec76385..000000000
--- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py
+++ /dev/null
@@ -1,78 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 ZTE Corporation
-# feng.xiaowei@zte.com.cn
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-import unittest
-
-from opnfv_testapi.common.constants import HTTP_NOT_FOUND, HTTP_OK
-
-from test_result import TestResultBase
-
-
-class TestDashboardBase(TestResultBase):
- def setUp(self):
- super(TestDashboardBase, self).setUp()
- self.basePath = '/dashboard/v1/results'
- self.create_help('/api/v1/results', self.req_d)
- self.create_help('/api/v1/results', self.req_d)
- self.list_res = None
-
-
-class TestDashboardQuery(TestDashboardBase):
- def test_projectMissing(self):
- code, body = self.query(self._set_query(project='missing'))
- self.assertEqual(code, HTTP_NOT_FOUND)
- self.assertIn('Project name missing', body)
-
- def test_projectNotReady(self):
- code, body = self.query(self._set_query(project='notReadyProject'))
- self.assertEqual(code, HTTP_NOT_FOUND)
- self.assertIn('Project [notReadyProject] not dashboard ready', body)
-
- def test_testcaseMissing(self):
- code, body = self.query(self._set_query(case='missing'))
- self.assertEqual(code, HTTP_NOT_FOUND)
- self.assertIn('Test case missing for project [{}]'
- .format(self.project),
- body)
-
- def test_testcaseNotReady(self):
- code, body = self.query(self._set_query(case='notReadyCase'))
- self.assertEqual(code, HTTP_NOT_FOUND)
- self.assertIn(
- 'Test case [notReadyCase] not dashboard ready for project [%s]'
- % self.project,
- body)
-
- def test_success(self):
- code, body = self.query(self._set_query())
- self.assertEqual(code, HTTP_OK)
- self.assertIn('{"description": "vPing results for Dashboard"}', body)
-
- def test_caseIsStatus(self):
- code, body = self.query(self._set_query(case='status'))
- self.assertEqual(code, HTTP_OK)
- self.assertIn('{"description": "Functest status"}', body)
-
- def _set_query(self, project=None, case=None):
- uri = ''
- for k, v in list(locals().iteritems()):
- if k == 'self' or k == 'uri':
- continue
- if v is None:
- v = self.__getattribute__(k)
- if v != 'missing':
- uri += '{}={}&'.format(k, v)
- uri += 'pod={}&'.format(self.pod)
- uri += 'version={}&'.format(self.version)
- uri += 'installer={}&'.format(self.installer)
- uri += 'period={}&'.format(5)
- return uri[0:-1]
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py
deleted file mode 100644
index f9d2015be..000000000
--- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import json
-
-from opnfv_testapi.common.constants import HTTP_OK
-from test_base import TestBase
-
-
-class TestDashboardProjectBase(TestBase):
- def setUp(self):
- super(TestDashboardProjectBase, self).setUp()
- self.basePath = '/dashboard/v1/projects'
- self.list_res = None
- self.projects = ['bottlenecks', 'doctor', 'functest',
- 'promise', 'qtip', 'vsperf', 'yardstick']
-
-
-class TestDashboardProjectGet(TestDashboardProjectBase):
- def test_list(self):
- code, body = self.get()
- self.assertEqual(code, HTTP_OK)
- self.assertItemsEqual(self.projects, json.loads(body))