auth: add a timeout mechanism to simple token

This commit is contained in:
Vimal Kumar
2016-11-15 00:47:55 +05:30
parent 677606da7d
commit dfe853ebff
4 changed files with 129 additions and 6 deletions

View File

@ -81,6 +81,7 @@ func TestCheckPassword(t *testing.T) {
}()
as := NewAuthStore(b)
defer as.Close()
err := enableAuthAndCreateRoot(as)
if err != nil {
t.Fatal(err)
@ -125,6 +126,7 @@ func TestUserDelete(t *testing.T) {
}()
as := NewAuthStore(b)
defer as.Close()
err := enableAuthAndCreateRoot(as)
if err != nil {
t.Fatal(err)
@ -161,6 +163,7 @@ func TestUserChangePassword(t *testing.T) {
}()
as := NewAuthStore(b)
defer as.Close()
err := enableAuthAndCreateRoot(as)
if err != nil {
t.Fatal(err)
@ -206,6 +209,7 @@ func TestRoleAdd(t *testing.T) {
}()
as := NewAuthStore(b)
defer as.Close()
err := enableAuthAndCreateRoot(as)
if err != nil {
t.Fatal(err)
@ -226,6 +230,7 @@ func TestUserGrant(t *testing.T) {
}()
as := NewAuthStore(b)
defer as.Close()
err := enableAuthAndCreateRoot(as)
if err != nil {
t.Fatal(err)