]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mgr/dashboard/test_requests.py
1 # -*- coding: utf-8 -*-
3 from __future__
import absolute_import
5 from . import DEFAULT_API_VERSION
6 from .helper
import DashboardTestCase
9 class RequestsTest(DashboardTestCase
):
11 self
._get
('/api/summary')
13 'Content-Encoding': 'gzip',
14 'Content-Type': 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_API_VERSION
)
17 def test_force_no_gzip(self
):
18 self
._get
('/api/summary', headers
={'Accept-Encoding': 'identity'})
19 self
.assertNotIn('Content-Encoding', self
._resp
.headers
)
21 'Content-Type': 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_API_VERSION
)
24 def test_server(self
):
25 self
._get
('/api/summary')
27 'server': 'Ceph-Dashboard',
28 'Content-Type': 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_API_VERSION
),
29 'Content-Security-Policy': "frame-ancestors 'self';",
30 'X-Content-Type-Options': 'nosniff',
31 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload'