Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickfix - restore inadvertently overwritten mocks #3899

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

kimorris27
Copy link
Contributor

Which issue this PR addresses:

No Jira; just addresses a small issue I encountered in my work.

What this PR does / why we need it:

The commands specified in generate.go in the armmsi package prior to this PR clobbered the contents of one of the mockgen commands, resulting in mocks for only one of the two interfaces being written to the file. This PR has mockgen write each of the interfaces to separate files to restore the mocks that were overwritten.

Test plan for issue:

Ran make generate

Is there any documentation that needs to be updated for this PR?

N/A

How do you know this will function as expected in production?

N/A

@kimorris27
Copy link
Contributor Author

/azp run ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@bitoku bitoku left a comment

Choose a reason for hiding this comment

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

nit:
You can use the old way (mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go) if you specify the clients in a single line just like this, I guess.

//go:generate mockgen -destination=../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/$GOPACKAGE InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient,SubnetsClient

Copy link
Collaborator

@tsatam tsatam left a comment

Choose a reason for hiding this comment

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

change looks good, checks look good, :shipit:

@tsatam tsatam merged commit a1029af into master Oct 11, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chainsaw Pull requests or issues owned by Team Chainsaw ready-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants