diff --git a/session/sess_cookie_test.go b/session/sess_cookie_test.go index 4f40a7ba..fe3ac806 100644 --- a/session/sess_cookie_test.go +++ b/session/sess_cookie_test.go @@ -29,7 +29,10 @@ func TestCookie(t *testing.T) { } r, _ := http.NewRequest("GET", "/", nil) w := httptest.NewRecorder() - sess := globalSessions.SessionStart(w, r) + sess, err := globalSessions.SessionStart(w, r) + if err != nil { + t.Fatal("set error,", err) + } err = sess.Set("username", "astaxie") if err != nil { t.Fatal("set error,", err) diff --git a/session/sess_mem_test.go b/session/sess_mem_test.go index 03927c76..43f5b0a9 100644 --- a/session/sess_mem_test.go +++ b/session/sess_mem_test.go @@ -26,9 +26,12 @@ func TestMem(t *testing.T) { go globalSessions.GC() r, _ := http.NewRequest("GET", "/", nil) w := httptest.NewRecorder() - sess := globalSessions.SessionStart(w, r) + sess, err := globalSessions.SessionStart(w, r) + if err != nil { + t.Fatal("set error,", err) + } defer sess.SessionRelease(w) - err := sess.Set("username", "astaxie") + err = sess.Set("username", "astaxie") if err != nil { t.Fatal("set error,", err) }