]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/mgr/dashboard/test_requests.py
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / qa / tasks / mgr / dashboard / test_requests.py
index eba81d673af2c99301225d963a4266c70d78ad47..93b175bfda0ea635248d1a3f921fdc2dc7144684 100644 (file)
@@ -2,6 +2,7 @@
 
 from __future__ import absolute_import
 
+from . import DEFAULT_VERSION
 from .helper import DashboardTestCase
 
 
@@ -10,7 +11,7 @@ class RequestsTest(DashboardTestCase):
         self._get('/api/summary')
         self.assertHeaders({
             'Content-Encoding': 'gzip',
-            'Content-Type': 'application/json',
+            'Content-Type': 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION)
         })
 
     def test_force_no_gzip(self):
@@ -19,8 +20,14 @@ class RequestsTest(DashboardTestCase):
         ))
         self.assertNotIn('Content-Encoding', self._resp.headers)
         self.assertHeaders({
-            'Content-Type': 'application/json',
+            'Content-Type': 'application/json'
+        })
+
+    def test_server(self):
+        self._get('/api/summary')
+        self.assertHeaders({
             'server': 'Ceph-Dashboard',
+            'Content-Type': 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION),
             'Content-Security-Policy': "frame-ancestors 'self';",
             'X-Content-Type-Options': 'nosniff',
             'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload'