You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Screenshot
No response
What did you do?
After running the tests I noticed that the cache middleware tests do not cover bypassing the cache by cookie.
What did you see happen?
What did you expect to see?
I propose to contribute a unit test covering the cache middleware bypass functionality with cookie settings in golang.org/x/pkgsite/internal/middleware/caching.go. This addition will elevate the test coverage from 73% to 75.7% and address an important yet uncovered part of the codebase.
Looking forward to collaborating on this enhancement.
The text was updated successfully, but these errors were encountered:
My guess is that this behavior is tested by integration tests, though I don't know.
I'm inclined to decline adding additional unit tests at this point, as the project is relatively stable, and unit tests are most useful during periods of active development. At this point, the cognitive overhead to review a unit test may not be worthwhile.
We aren't particularly concerned about unit test coverage percentage at this phase in the project's lifecycle.
So I don't encourage acting on this now. I'll defer to @jba if he would like to review a contribution here.
What is the URL of the page with the issue?
https://github.com/golang/pkgsite/blob/ddbbf7b6745ea937506c52fefb4d4688b5f0665e/internal/middleware/caching.go#L148
What is your user agent?
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Screenshot
No response
What did you do?
After running the tests I noticed that the cache middleware tests do not cover bypassing the cache by cookie.
What did you see happen?
What did you expect to see?
I propose to contribute a unit test covering the cache middleware bypass functionality with cookie settings in
golang.org/x/pkgsite/internal/middleware/caching.go
. This addition will elevate the test coverage from 73% to 75.7% and address an important yet uncovered part of the codebase.Looking forward to collaborating on this enhancement.
The text was updated successfully, but these errors were encountered: