From: Volker Theile Date: Thu, 23 Jan 2020 09:25:53 +0000 (+0100) Subject: mgr/dashboard: Unit test does not do the mentioned thing X-Git-Tag: v15.1.0~70^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32799%2Fhead;p=ceph.git mgr/dashboard: Unit test does not do the mentioned thing The unit test AccessControlTest::test_load_v2() is testing a v1 database instead of a v2. Fixes: https://tracker.ceph.com/issues/43760 Signed-off-by: Volker Theile --- diff --git a/src/pybind/mgr/dashboard/tests/test_access_control.py b/src/pybind/mgr/dashboard/tests/test_access_control.py index 3837e25d97a8..246dcbf85d05 100644 --- a/src/pybind/mgr/dashboard/tests/test_access_control.py +++ b/src/pybind/mgr/dashboard/tests/test_access_control.py @@ -718,10 +718,7 @@ class AccessControlTest(unittest.TestCase, CLICommandTestMixin): }) def test_load_v2(self): - """ - The `enabled` and `pwdExpirationDate` attributes of a user have been added in v2 - """ - self.CONFIG_KEY_DICT['accessdb_v1'] = ''' + self.CONFIG_KEY_DICT['accessdb_v2'] = ''' {{ "users": {{ "admin": {{ @@ -746,7 +743,7 @@ class AccessControlTest(unittest.TestCase, CLICommandTestMixin): }} }} }}, - "version": 1 + "version": 2 }} '''.format(int(round(time.time())), Scope.ISCSI, Permission.READ, Permission.UPDATE, Scope.POOL, Permission.CREATE)