From 4d8dbe5c6e7790569adc922013568691bb520b59 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Thu, 23 Jan 2020 10:25:53 +0100 Subject: [PATCH] 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 --- src/pybind/mgr/dashboard/tests/test_access_control.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pybind/mgr/dashboard/tests/test_access_control.py b/src/pybind/mgr/dashboard/tests/test_access_control.py index 3837e25d97a8a..246dcbf85d057 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) -- 2.39.5