alexedwards / scs

HTTP Session Management for Go
MIT License
2.09k stars 166 forks source link

Improve Tests #99

Closed verygoodsoftwarenotvirus closed 4 years ago

verygoodsoftwarenotvirus commented 4 years ago

Hello,

A while ago I made a PR to this repo which fixed a data race. While my changes were merged (and I'm very grateful!), a new release was never cut so that I could use those changes in my own projects. I'd greatly appreciate it if you would cut a new release so I can do that.

That said, I know how entitled open source users can be, and I've vowed to try and never be like that, so I've made these changes to increase the test coverage of SessionManager.Load and SessionManager.Commit, to compensate for my request. Part of these changes include a mock Store interface, which I needed to test a few code paths. That interface has complete test coverage, and since I noticed in a comment on this PR that you'd prefer no new dependencies be introduced, I've tried to adhere to that.

I also realized that one of my changes introduced the incomprehensible format verb %vgi, which I assume is a vim oopsie, that I've fixed as well.

alexedwards commented 4 years ago

Thank you!

I've merged this PR and released v2.4.0.