From: Ricardo Dias Date: Fri, 23 Mar 2018 10:25:48 +0000 (+0100) Subject: qa/tasks/mgr/dashboard: Fix login expires too soon X-Git-Tag: v13.1.0~514^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d101b33bc7289a6ec5d012294b254cc1bfde7334;p=ceph.git qa/tasks/mgr/dashboard: Fix login expires too soon Signed-off-by: Sebastian Wagner --- diff --git a/qa/tasks/mgr/dashboard/test_auth.py b/qa/tasks/mgr/dashboard/test_auth.py index b176dd041b1a..1c71687a4d1f 100644 --- a/qa/tasks/mgr/dashboard/test_auth.py +++ b/qa/tasks/mgr/dashboard/test_auth.py @@ -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")