feat: different stores for many sessions #144#282
feat: different stores for many sessions #144#282appleboy merged 6 commits intogin-contrib:masterfrom found-cake:master
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #282 +/- ##
===========================================
+ Coverage 64.00% 82.98% +18.98%
===========================================
Files 8 12 +4
Lines 75 482 +407
===========================================
+ Hits 48 400 +352
- Misses 25 63 +38
- Partials 2 19 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Follow-up to #830a1b9: Replace `http.NewRequest` with `http.NewRequestWithContext` in multiple test functions in `tester.go` and `tester_options_samesite_go1.11.go` Signed-off-by: found-cake <me@foundcake.kr>
There was a problem hiding this comment.
Pull Request Overview
This PR resolves merge conflicts by incorporating the new multi session store functionality into tests and documentation. It introduces a new function for handling multiple session stores and updates tests across various storage backends, along with updating the README with usage examples.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tester/tester.go | Added ManyStores function to test multiple session stores with Gin middleware |
| sessions.go | Introduced SessionStore struct type and SessionsManyStores handler function |
| redis/redis_test.go | Added test for ManyStores with Redis store |
| postgres/postgres_test.go | Added test for ManyStores with Postgres store |
| mongo/mongomgo/mongomgo_test.go | Added test for ManyStores with Mongo driver store |
| memstore/memstore_test.go | Added test for ManyStores with memstore store |
| memcached/memcached_test.go | Added tests for ManyStores with memcached; note a naming issue in one test function |
| cookie/cookie_test.go | Added test for ManyStores with cookie store |
| README.md | Updated documentation with an example of multiple session stores usage in Gin |
Comments suppressed due to low confidence (1)
memcached/memcached_test.go:78
- Typo in the test function name 'TestBinaryMemcached_SessionManyStpres'; consider renaming it to 'TestBinaryMemcached_SessionManyStores' for improved clarity.
func TestBinaryMemcached_SessionManyStpres(t *testing.T) {
Resolved merge conflicts in PR #144 , which has been pending for a long time due to conflicts.
ref: #124