Test_SessionManager_DelRaw_StoreError covers the error branch when the session store cannot be loaded during delRaw.
(t *testing.T)
| 2966 | // Test_SessionManager_DelRaw_StoreError covers the error branch when the session |
| 2967 | // store cannot be loaded during delRaw. |
| 2968 | func Test_SessionManager_DelRaw_StoreError(t *testing.T) { |
| 2969 | t.Parallel() |
| 2970 | |
| 2971 | storage := newFlakySessionStorage() |
| 2972 | storage.failGet = true |
| 2973 | store := session.NewStore(session.Config{ |
| 2974 | Storage: storage, |
| 2975 | Extractor: extractors.FromCookie("session_id"), |
| 2976 | }) |
| 2977 | m := newSessionManager(store) |
| 2978 | |
| 2979 | app := fiber.New() |
| 2980 | c := newSessionCtx(app, "abc") |
| 2981 | defer app.ReleaseCtx(c) |
| 2982 | |
| 2983 | require.NotPanics(t, func() { |
| 2984 | m.delRaw(c) |
| 2985 | }) |
| 2986 | } |
| 2987 | |
| 2988 | // Test_SessionManager_DelRaw_SaveError covers the save-failure warning branch of |
| 2989 | // delRaw. |
nothing calls this directly
no test coverage detected