oauth2-proxy
oauth2-proxy copied to clipboard
chore(deps): Updated to ginkgo v2
Description
Updated ginkgo to v2
Motivation and Context
Ginkgo was outdated
How Has This Been Tested?
Checklist:
Ran tests locally.
- [x] My change requires a change to the documentation or CHANGELOG.
- [x] I have updated the documentation/CHANGELOG accordingly.
- [x] I have created a feature (non-master) branch for my PR.
- [ ] I have written tests for my code changes.
I don't think this change requires a changelog entry since only _test.go files were changed
Changes look good, but somehow it's broken the redis tests so will need some investigation as to why those are broken now
I'll have a look this evening
@tuunit any idea? I've been going around in circles for a couple of hours. A fresh pair of (more experienced) eyes would help.
Currently showing
=== RUN TestBasicSuite
Ginkgo detected an issue with your spec structure
AfterSuite(func() {
/home/runner/work/oauth2-proxy/oauth2-proxy/pkg/authentication/basic/htpasswd_test.go:104
It looks like you are trying to add a [AfterSuite] node within a container
node.
AfterSuite can only be called at the top level.
Learn more at:
http://onsi.github.io/ginkgo/#suite-setup-and-cleanup-beforesuite-and-aftersuite
FAIL github.com/oauth2-proxy/oauth2-proxy/v7/pkg/authentication/basic 0.020s
Which looks like it should be fairly straightforward, AfterSuite cannot be nested inside another container
https://github.com/oauth2-proxy/oauth2-proxy/blob/a524c1fb466313c616e7699ffd557e2f8fd49aff/pkg/authentication/basic/htpasswd_test.go#L104
Should be AfterEach
not AfterSuite
@kvanzuijlen @JoelSpeed I fixed the Ginkgo issues :)
https://github.com/oauth2-proxy/oauth2-proxy/blob/a524c1fb466313c616e7699ffd557e2f8fd49aff/pkg/authentication/basic/htpasswd_test.go#L104
Should be
AfterEach
notAfterSuite
Indeed this was one of the issues. Ginkgo v1 didn't really enforce that AfterSuite
can only be defined outside of the spec.
Furthermore, the execution order seems to have changed slightly which causes issues with the miniredis teardown. Therefore I separated the redis store tests into two specs. One for the miniredis configure with TLS and one without.