Skip to content

feat: different stores for many sessions #144#282

Merged
appleboy merged 6 commits intogin-contrib:masterfrom
found-cake:master
May 23, 2025
Merged

feat: different stores for many sessions #144#282
appleboy merged 6 commits intogin-contrib:masterfrom
found-cake:master

Conversation

@found-cake
Copy link
Copy Markdown
Contributor

@found-cake found-cake commented Mar 23, 2025

Resolved merge conflicts in PR #144 , which has been pending for a long time due to conflicts.

ref: #124

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 89.09091% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.98%. Comparing base (5c9a349) to head (fc6a3d7).
⚠️ Report is 48 commits behind head on master.

Files with missing lines Patch % Lines
tester/tester.go 86.95% 4 Missing and 2 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@appleboy appleboy requested a review from Copilot May 22, 2025 03:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Signed-off-by: found-cake <me@foundcake.kr>
@appleboy appleboy changed the title Resolve merge conflicts in PR #144 feat: different stores for many sessions #144 May 23, 2025
@appleboy appleboy merged commit 4327f7e into gin-contrib:master May 23, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants