Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 655 Bytes

MOCK_GENERATION.md

File metadata and controls

20 lines (11 loc) · 655 Bytes

Client Mock Generation

go-mock is used to generate mocks of the ArgoCD client.

Install

Follow the installation instructions to get the latest version.

Generate mocks

The following example shows how to generate mocks for the projects API:

MOCK_API="projects"
MOCK_INTERFACE="ProjectServiceClient"

mockgen -package $MOCK_API -destination pkg/clients/mock/$MOCK_API/mock.go github.com/crossplane-contrib/provider-argocd/pkg/clients/$MOCK_API $MOCK_INTERFACE

go:generate

To automatically regenerate mocks, extend pkg/clients/generate.go.