]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: python unit tests refactoring
authorAlfonso Martínez <almartin@redhat.com>
Wed, 3 Nov 2021 09:17:21 +0000 (10:17 +0100)
committerAlfonso Martínez <almartin@redhat.com>
Wed, 3 Nov 2021 09:36:47 +0000 (10:36 +0100)
commita6aeded5141ec3a959a86aa4002ccf5ac8d0a523
treeb16c3d8d40dc171c18339461df550b9033d5a2b6
parentdb1b226cc5ca8b2b79937f762fd8b697e3cba210
mgr/dashboard: python unit tests refactoring

* Controller tests: cherrypy config: authentication disabled by default; ability to pass custom config (e.g. enable authentication).
* Auth controller: add tests; test that unauthorized request fails when authentication is enabled.
* DocsTest: clear ENDPOINT_MAP so the test_gen_tags test becomes deterministic.
* pylint: disable=no-name-in-module: fix imports in tests.

Fixes: https://tracker.ceph.com/issues/53083
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
28 files changed:
doc/dev/developer_guide/dash-devel.rst
src/pybind/mgr/dashboard/tests/__init__.py
src/pybind/mgr/dashboard/tests/test_access_control.py
src/pybind/mgr/dashboard/tests/test_api_auditing.py
src/pybind/mgr/dashboard/tests/test_auth.py
src/pybind/mgr/dashboard/tests/test_cephfs.py
src/pybind/mgr/dashboard/tests/test_controllers.py
src/pybind/mgr/dashboard/tests/test_docs.py
src/pybind/mgr/dashboard/tests/test_erasure_code_profile.py
src/pybind/mgr/dashboard/tests/test_exceptions.py
src/pybind/mgr/dashboard/tests/test_feature_toggles.py
src/pybind/mgr/dashboard/tests/test_grafana.py
src/pybind/mgr/dashboard/tests/test_home.py
src/pybind/mgr/dashboard/tests/test_host.py
src/pybind/mgr/dashboard/tests/test_iscsi.py
src/pybind/mgr/dashboard/tests/test_orchestrator.py
src/pybind/mgr/dashboard/tests/test_osd.py
src/pybind/mgr/dashboard/tests/test_plugin_debug.py
src/pybind/mgr/dashboard/tests/test_pool.py
src/pybind/mgr/dashboard/tests/test_prometheus.py
src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py
src/pybind/mgr/dashboard/tests/test_rest_tasks.py
src/pybind/mgr/dashboard/tests/test_rgw.py
src/pybind/mgr/dashboard/tests/test_rgw_client.py
src/pybind/mgr/dashboard/tests/test_settings.py
src/pybind/mgr/dashboard/tests/test_sso.py
src/pybind/mgr/dashboard/tests/test_tools.py
src/pybind/mgr/dashboard/tests/test_versioning.py