Mock ClientSet #7568
Mock ClientSet
#7568
-
hey everyone, Im trying to test a Go application which creates workflows, it uses the Go SDK. Is there a way to get a mock client set that I can use to dry run creating workflows? For e.g, with Kubernetes client-go I can do The function that creates the workflow accepts func: func CreateWorkflow(wfRequest *workflow.WorkflowCreateRequest, WFClient workflowpkg.WorkflowServiceClient) (string, error) {
wf, err := WFClient.CreateWorkflow(context.Background, wfRequest)
if err != nil {
return "", err
}
return wf.GetName(), nil
} |
Beta Was this translation helpful? Give feedback.
Answered by
terrytangyuan
Jan 28, 2022
Replies: 1 comment 1 reply
-
This might be what you are looking for: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Hunter-Thompson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might be what you are looking for:
argo-workflows/pkg/client/clientset/versioned/fake/clientset_generated.go
Line 20 in 303bf79