]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/mgr/dashboard: Fix login expires too soon 21021/head
authorRicardo Dias <rdias@suse.com>
Fri, 23 Mar 2018 10:25:48 +0000 (11:25 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 23 Mar 2018 10:30:16 +0000 (11:30 +0100)
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
qa/tasks/mgr/dashboard/test_auth.py

index b176dd041b1a8fde1e81c1f8b322fdde206048b1..1c71687a4d1f87dc0dadfad4949fd770c2b61515 100644 (file)
@@ -10,7 +10,6 @@ from .helper import DashboardTestCase
 class AuthTest(DashboardTestCase):
     def setUp(self):
         self.reset_session()
-        self._ceph_cmd(['dashboard', 'set-session-expire', '2'])
         self._ceph_cmd(['dashboard', 'set-login-credentials', 'admin', 'admin'])
 
     def test_a_set_login_credentials(self):
@@ -60,6 +59,7 @@ class AuthTest(DashboardTestCase):
         self.assertStatus(401)
 
     def test_session_expire(self):
+        self._ceph_cmd(['dashboard', 'set-session-expire', '2'])
         self._post("/api/auth", {'username': 'admin', 'password': 'admin'})
         self.assertStatus(201)
         self._get("/api/host")
@@ -67,6 +67,7 @@ class AuthTest(DashboardTestCase):
         time.sleep(3)
         self._get("/api/host")
         self.assertStatus(401)
+        self._ceph_cmd(['dashboard', 'set-session-expire', '1200'])
 
     def test_unauthorized(self):
         self._get("/api/host")