]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Unit test does not do the mentioned thing 32799/head
authorVolker Theile <vtheile@suse.com>
Thu, 23 Jan 2020 09:25:53 +0000 (10:25 +0100)
committerVolker Theile <vtheile@suse.com>
Thu, 23 Jan 2020 09:25:53 +0000 (10:25 +0100)
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 <vtheile@suse.com>
src/pybind/mgr/dashboard/tests/test_access_control.py

index 3837e25d97a8a936606b38fad5086bc11cc7b2e8..246dcbf85d057666a5607a23d939e8e1f65429c3 100644 (file)
@@ -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)