Skip to content

refactor: migrate test suite from Ginkgo v1 to v2#240

Merged
tnikolova82 merged 2 commits into
masterfrom
ginkgo-v2
Mar 6, 2026
Merged

refactor: migrate test suite from Ginkgo v1 to v2#240
tnikolova82 merged 2 commits into
masterfrom
ginkgo-v2

Conversation

@ramonskie
Copy link
Copy Markdown
Contributor

Summary

Full migration of the test suite from Ginkgo v1 to v2, split across two commits:

Commit 1 — go.mod + import paths

  • Bumped go.mod to github.com/onsi/ginkgo/v2
  • Updated all import paths from github.com/onsi/ginkgo to github.com/onsi/ginkgo/v2
  • Ran go mod tidy and go mod vendor

Commit 2 — Test idiom migration

  • Replaced all AfterEach cleanup blocks with DeferCleanup co-located in BeforeEach/JustBeforeEach
  • Bare AfterEach at Describe-level replaced with direct DeferCleanup calls in the Describe body
  • Removed redundant mockCtrl.Finish() calls (auto-handled by GinkgoT() in v2)

Verification

  • go build ./...
  • Zero AfterEach remaining ✅

Upgrade github.com/onsi/ginkgo v1.16.5 -> v2 and update all import
paths from github.com/onsi/ginkgo to github.com/onsi/ginkgo/v2.
Replace all AfterEach cleanup blocks with DeferCleanup calls co-located
in BeforeEach/JustBeforeEach, following Ginkgo v2 idioms. Bare AfterEach
at Describe-level are replaced with direct DeferCleanup calls in the
Describe body.
Copy link
Copy Markdown
Contributor

@tnikolova82 tnikolova82 left a comment

Choose a reason for hiding this comment

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

lgtm

@tnikolova82 tnikolova82 merged commit 965618e into master Mar 6, 2026
1 check passed
@tnikolova82 tnikolova82 deleted the ginkgo-v2 branch March 6, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants