apply mockery in queue_service_test #6859
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tracking issue
Closes #6855
Why are the changes needed?
The repository has been migrating to a standardized mocking approach using
mockerywithEXPECT()semantics (see PR #6829).However,
queue_service_test.gowas still relying on a manually defined mock implementation and the legacyOn()API fromtestify/mock.Aligning
queue_service_test.gowith the existingmockeryconfiguration ensures consistency, improves readability, and follows the recommended mocking best practices adopted in the codebase.What changes were proposed in this pull request?
This PR refactors the queue service tests to fully adopt
mockery-generated mocks andEXPECT()-based expectations.Specifically:
github.com/flyteorg/flyte/v2/queue/serviceto.mockery.yamlso that mocks forQueueClientInterfaceare generated automatically.MockQueueClientfromqueue_service_test.go.mockery-generated mocks (mocks.NewQueueClientInterface(t)).On(...)toEXPECT().Method(...), aligning with the preferred mocking style used across the repository.No production code behavior was modified as part of this change.
How was this patch tested?
queue_service_test.gowere updated to usemockerymocks and continue to pass.queue_service_test.gowere run locally using:Labels
Setup process
No special setup is required beyond the existing development environment.
Screenshots
N/A
Check all the applicable boxes
Related PRs
.mockery.yamlDocs link
N/A