Skip to content

test(storage): Replace handwritten storage mocks with gomock bazel rule#79

Merged
manjari25 merged 6 commits into
mainfrom
manjari/gomock-for-storage
Feb 25, 2026
Merged

test(storage): Replace handwritten storage mocks with gomock bazel rule#79
manjari25 merged 6 commits into
mainfrom
manjari/gomock-for-storage

Conversation

@manjari25
Copy link
Copy Markdown
Contributor

@manjari25 manjari25 commented Feb 25, 2026

Summary

test(storage): Replace handwritten storage mocks with gomock bazel rule

What?

Replace handwritten storage mocks in gateway/controller/land_test.go with generated mocks using gomock and the Bazel gomock rule. The mocks are generated at build time — no generated .go files are checked in.

Why?

Handwritten mocks have to be manually updated every time a storage interface changes. Using gomock with the Bazel gomock rule eliminates this maintenance burden and guarantees mocks stay in sync with interfaces automatically.

Test Plan

Issues

@manjari25 manjari25 marked this pull request as ready for review February 25, 2026 19:57
@manjari25 manjari25 force-pushed the manjari/gomock-for-storage branch 2 times, most recently from 399a6d9 to 62f47bd Compare February 25, 2026 20:09
Comment thread extension/storage/mock/BUILD.bazel
@manjari25 manjari25 force-pushed the manjari/gomock-for-storage branch from bec50a3 to 1d77cf8 Compare February 25, 2026 22:27
@manjari25 manjari25 merged commit 348975f into main Feb 25, 2026
8 checks passed
@behinddwalls behinddwalls deleted the manjari/gomock-for-storage branch June 2, 2026 18:40
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.

3 participants