diff options
author | Qiaowei Ren <qiaowei.ren@intel.com> | 2018-03-01 14:38:11 +0800 |
---|---|---|
committer | Qiaowei Ren <qiaowei.ren@intel.com> | 2018-03-01 14:38:11 +0800 |
commit | 7da45d65be36d36b880cc55c5036e96c24b53f00 (patch) | |
tree | d4f944eb4f8f8de50a9a7584ffa408dc3a3185b2 /src/ceph/qa/tasks/mgr/test_dashboard.py | |
parent | 691462d09d0987b47e112d6ee8740375df3c51b2 (diff) |
remove ceph code
This patch removes initial ceph code, due to license issue.
Change-Id: I092d44f601cdf34aed92300fe13214925563081c
Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
Diffstat (limited to 'src/ceph/qa/tasks/mgr/test_dashboard.py')
-rw-r--r-- | src/ceph/qa/tasks/mgr/test_dashboard.py | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/ceph/qa/tasks/mgr/test_dashboard.py b/src/ceph/qa/tasks/mgr/test_dashboard.py deleted file mode 100644 index 3b8a2cc..0000000 --- a/src/ceph/qa/tasks/mgr/test_dashboard.py +++ /dev/null @@ -1,70 +0,0 @@ - - -from mgr_test_case import MgrTestCase - -import logging -import requests - - -log = logging.getLogger(__name__) - - -class TestDashboard(MgrTestCase): - MGRS_REQUIRED = 3 - - def test_standby(self): - self._assign_ports("dashboard", "server_port") - self._load_module("dashboard") - - original_active = self.mgr_cluster.get_active_id() - - original_uri = self._get_uri("dashboard") - log.info("Originally running at {0}".format(original_uri)) - - self.mgr_cluster.mgr_fail(original_active) - - failed_over_uri = self._get_uri("dashboard") - log.info("After failover running at {0}".format(original_uri)) - - self.assertNotEqual(original_uri, failed_over_uri) - - # The original active daemon should have come back up as a standby - # and be doing redirects to the new active daemon - r = requests.get(original_uri, allow_redirects=False) - self.assertEqual(r.status_code, 303) - self.assertEqual(r.headers['Location'], failed_over_uri) - - def test_urls(self): - self._assign_ports("dashboard", "server_port") - self._load_module("dashboard") - - base_uri = self._get_uri("dashboard") - - # This is a very simple smoke test to check that the dashboard can - # give us a 200 response to requests. We're not testing that - # the content is correct or even renders! - - urls = [ - "/health", - "/servers", - "/osd/", - "/osd/perf/0", - "/rbd_mirroring", - "/rbd_iscsi" - ] - - failures = [] - - for url in urls: - r = requests.get(base_uri + url, allow_redirects=False) - if r.status_code >= 300 and r.status_code < 400: - log.error("Unexpected redirect to: {0} (from {1})".format( - r.headers['Location'], base_uri)) - if r.status_code != 200: - failures.append(url) - - log.info("{0}: {1} ({2} bytes)".format( - url, r.status_code, len(r.content) - )) - - self.assertListEqual(failures, []) |