]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Thu, 4 Nov 2021 16:22:48 +0000 (17:22 +0100)
commit8cf2ca8a998e2ef9419a834e9154a0993205c293
treead4255c43bdac6cb88b357a5ec4a084c230a619b
parentbee105ca88209c0345232b83a30531c937816743
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>
(cherry picked from commit a6aeded5141ec3a959a86aa4002ccf5ac8d0a523)

 Conflicts:
src/pybind/mgr/dashboard/tests/test_docs.py
    - Resolved conflicts.
src/pybind/mgr/dashboard/tests/test_iscsi.py
    - Resolved conflicts.
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