Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SessionDestroyer test error undefined sid #152

Closed
wants to merge 38 commits into from
Closed
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c97f77a
add session destroy
Dec 10, 2019
7798e3b
typo fix
Dec 10, 2019
1caf6c1
session destroyer init
Dec 10, 2019
2369fd7
impliment dummy ExecuteRegistrationPostHook
Dec 10, 2019
181bfce
impliment test case and error fix
Dec 10, 2019
8460442
test case updated
Dec 10, 2019
f85e1b1
Merge pull request #1 from evalsocket/fix-139
yindia Dec 10, 2019
ce28593
Revert the blank line
Dec 11, 2019
4581b83
Added new interface DeleteSessionsFor
Dec 11, 2019
c6f7667
Fix the syntax error from code
Dec 11, 2019
6707aed
Merge pull request #2 from evalsocket/fix-139
yindia Dec 11, 2019
f6ff261
Testcase Added for SessionDestroyer
Dec 11, 2019
92f995e
Merge pull request #3 from evalsocket/fix-139
yindia Dec 11, 2019
efb6be6
Testcase updated for SessionDestroyer
Dec 11, 2019
d90e08b
Merge pull request #4 from evalsocket/fix-139
yindia Dec 11, 2019
ee32a48
Testcase added for DeleteSessionFor
Dec 11, 2019
5b5e387
Merge pull request #5 from evalsocket/fix-139
yindia Dec 11, 2019
bfef366
Testcase updated for DeleteSessionFor
Dec 11, 2019
6686c89
Merge pull request #6 from evalsocket/fix-139
yindia Dec 11, 2019
c9306c4
Fix syntax error for testcases SessionDestroyer & DeleteSessionsFor
Dec 11, 2019
e73c5a1
Merge pull request #7 from evalsocket/fix-139
yindia Dec 11, 2019
f46a156
Added new post hook in registry_default_hooks
Dec 11, 2019
1a3e48b
Merge pull request #8 from evalsocket/fix-139
yindia Dec 11, 2019
8ff2dd4
PostHook added for registration
Dec 11, 2019
11222ac
Fix typo error
Dec 11, 2019
f87b120
Remove ExecWithCount with Exec
Dec 11, 2019
74f2248
Testcase update to test session_destroyer
Dec 11, 2019
0e9dd4d
Syntax error fix in DeleteSessionsFor sql query
Dec 11, 2019
0c1653a
Testcase updated for session_destroyer & ExecuteLoginPostHook
Dec 11, 2019
7bcf0ed
Fix type error revoke_active_sessions
Dec 11, 2019
dc508a7
Fix type error in session/persistence.go
Dec 11, 2019
a1bcc3b
Fix type error in session/persistence.go
Dec 11, 2019
ec0d0c1
Update session/persistence.go
yindia Dec 11, 2019
4f25a81
Merge branch 'master' of github.com:evalsocket/kratos
Dec 11, 2019
f5f8d0a
Fix SessionDestroyer test error undefined sid
yindia Dec 12, 2019
2b2d654
Merge pull request #9 from evalsocket/evalsocket-patch-1
yindia Dec 12, 2019
d73c0e3
Merge branch 'master' of github.com:evalsocket/kratos
Dec 12, 2019
3b579b8
Fix error in TestSessionDestroyer
yindia Dec 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions selfservice/hook/session_destroyer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func TestSessionDestroyer(t *testing.T) {

i := identity.NewIdentity("")
require.NoError(t, reg.IdentityPool().CreateIdentity(context.Background(), i))
err := reg.SessionPersister().CreateSession(context.Background(), &session.Session{ID: sid1, Identity: i}))
err := reg.SessionPersister().CreateSession(context.Background(), &session.Session{ID: sid1, Identity: i})
require.NoError(t, err)
err = reg.SessionPersister().CreateSession(context.Background(), &session.Session{ID: sid2, Identity: i}))
err = reg.SessionPersister().CreateSession(context.Background(), &session.Session{ID: sid2, Identity: i})
require.NoError(t, err)
require.NoError(t, h.ExecuteLoginPostHook(w, &r, nil, &session.Session{ID: sid, Identity: i}))
require.NoError(t, h.ExecuteLoginPostHook(w, &r, nil, &session.Session{ID: sid1, Identity: i}))

_, err := reg.SessionPersister().GetSession(context.Background(), sid1)
require.Error(t, err)
Expand Down