Improving default session timeout behavour. (#10453)
* Improving default session timeout behavour. * Changing mind to 180 days instead of 548 days
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9abd4dd7dc
Коммит
5dae08761c
@@ -65,20 +65,6 @@ func TestGetSessionIdleTimeoutInMinutes(t *testing.T) {
|
||||
assert.Equal(t, "idle timeout", err.DetailedError)
|
||||
assert.Nil(t, rsession)
|
||||
|
||||
// Test mobile session, should not timeout
|
||||
session = &model.Session{
|
||||
UserId: model.NewId(),
|
||||
DeviceId: "android:" + model.NewId(),
|
||||
}
|
||||
|
||||
session, _ = th.App.CreateSession(session)
|
||||
time = session.LastActivityAt - (1000 * 60 * 6)
|
||||
<-th.App.Srv.Store.Session().UpdateLastActivityAt(session.Id, time)
|
||||
th.App.ClearSessionCacheForUserSkipClusterSend(session.UserId)
|
||||
|
||||
_, err = th.App.GetSession(session.Token)
|
||||
assert.Nil(t, err)
|
||||
|
||||
// Test oauth session, should not timeout
|
||||
session = &model.Session{
|
||||
UserId: model.NewId(),
|
||||
@@ -107,21 +93,6 @@ func TestGetSessionIdleTimeoutInMinutes(t *testing.T) {
|
||||
_, err = th.App.GetSession(session.Token)
|
||||
assert.Nil(t, err)
|
||||
|
||||
// Test regular session with license off, should not timeout
|
||||
th.App.SetLicense(nil)
|
||||
|
||||
session = &model.Session{
|
||||
UserId: model.NewId(),
|
||||
}
|
||||
|
||||
session, _ = th.App.CreateSession(session)
|
||||
time = session.LastActivityAt - (1000 * 60 * 6)
|
||||
<-th.App.Srv.Store.Session().UpdateLastActivityAt(session.Id, time)
|
||||
th.App.ClearSessionCacheForUserSkipClusterSend(session.UserId)
|
||||
|
||||
_, err = th.App.GetSession(session.Token)
|
||||
assert.Nil(t, err)
|
||||
|
||||
th.App.SetLicense(model.NewTestLicense("compliance"))
|
||||
|
||||
// Test regular session with timeout set to 0, should not timeout
|
||||
|
||||
Ссылка в новой задаче
Block a user