go.temporal.io/server@v1.23.0/common/testing/mocksdk/generate.sh (about) 1 #!/bin/sh 2 3 # These mocks need to be manually fixed up after generation because gomock 4 # uses the types in the internal package instead of the public type aliases. 5 mockgen -copyright_file ../../../LICENSE -package "$GOPACKAGE" go.temporal.io/sdk/client Client | \ 6 sed -e 's,internal,client,g' | \ 7 goimports > client_mock.go 8 9 mockgen -copyright_file ../../../LICENSE -package "$GOPACKAGE" go.temporal.io/sdk/worker Worker | \ 10 sed -e 's,internal.RegisterWorkflowOptions,workflow.RegisterOptions,g' \ 11 -e 's,internal.RegisterActivityOptions,activity.RegisterOptions,g' \ 12 -e 's,internal "go.temporal.io/sdk/internal",activity "go.temporal.io/sdk/activity"\n\tworkflow "go.temporal.io/sdk/workflow",' | \ 13 goimports > worker_mock.go 14 15 mockgen -copyright_file ../../../LICENSE -package "$GOPACKAGE" go.temporal.io/sdk/client WorkflowRun | \ 16 sed -e 's,internal,client,g' | \ 17 goimports > workflowrun_mock.go