mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2025-12-23 06:15:47 +00:00
Add module generate command and update all generated files
This commit is contained in:
@@ -50,6 +50,9 @@ function main() {
|
||||
KUBE_PANIC_WATCH_DECODE_ERROR=${kube_panic_watch_decode_error} \
|
||||
go test -short -race ./...
|
||||
;;
|
||||
'generate')
|
||||
go generate ./internal/mocks/...
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package credentialrequestmocks
|
||||
package mockcredentialrequest
|
||||
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=credentialrequestmocks.go -package=credentialrequestmocks -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/registry/credentialrequest TokenCredentialRequestAuthenticator
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=mockcredentialrequest.go -package=mockcredentialrequest -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/registry/credentialrequest TokenCredentialRequestAuthenticator
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen -destination=credentialrequestmocks.go -package=credentialrequestmocks -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/registry/credentialrequest TokenCredentialRequestAuthenticator
|
||||
// mockgen -destination=mockcredentialrequest.go -package=mockcredentialrequest -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/registry/credentialrequest TokenCredentialRequestAuthenticator
|
||||
//
|
||||
|
||||
// Package credentialrequestmocks is a generated GoMock package.
|
||||
package credentialrequestmocks
|
||||
// Package mockcredentialrequest is a generated GoMock package.
|
||||
package mockcredentialrequest
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package issuermocks
|
||||
package mockissuer
|
||||
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=issuermocks.go -package=issuermocks -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/clientcertissuer ClientCertIssuer
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=mockissuer.go -package=mockissuer -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/clientcertissuer ClientCertIssuer
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen -destination=issuermocks.go -package=issuermocks -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/clientcertissuer ClientCertIssuer
|
||||
// mockgen -destination=mockissuer.go -package=mockissuer -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/clientcertissuer ClientCertIssuer
|
||||
//
|
||||
|
||||
// Package issuermocks is a generated GoMock package.
|
||||
package issuermocks
|
||||
// Package mockissuer is a generated GoMock package.
|
||||
package mockissuer
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
package mocks
|
||||
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=mockpodcommandexecutor.go -package=mocks -copyright_file=../../../../hack/header.txt go.pinniped.dev/internal/controller/kubecertagent PodCommandExecutor
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=mockdynamiccert.go -package=mocks -copyright_file=../../../../hack/header.txt -mock_names Private=MockDynamicCertPrivate go.pinniped.dev/internal/dynamiccert Private
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=mockpodcommandexecutor.go -package=mocks -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/controller/kubecertagent PodCommandExecutor
|
||||
//go:generate go run -v go.uber.org/mock/mockgen -destination=mockdynamiccert.go -package=mocks -copyright_file=../../../hack/header.txt -mock_names Private=MockDynamicCertPrivate go.pinniped.dev/internal/dynamiccert Private
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen -destination=mockdynamiccert.go -package=mocks -copyright_file=../../../../hack/header.txt -mock_names Private=MockDynamicCertPrivate go.pinniped.dev/internal/dynamiccert Private
|
||||
// mockgen -destination=mockdynamiccert.go -package=mocks -copyright_file=../../../hack/header.txt -mock_names Private=MockDynamicCertPrivate go.pinniped.dev/internal/dynamiccert Private
|
||||
//
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// Generated by this command:
|
||||
//
|
||||
// mockgen -destination=mockpodcommandexecutor.go -package=mocks -copyright_file=../../../../hack/header.txt go.pinniped.dev/internal/controller/kubecertagent PodCommandExecutor
|
||||
// mockgen -destination=mockpodcommandexecutor.go -package=mocks -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/controller/kubecertagent PodCommandExecutor
|
||||
//
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
@@ -16,7 +16,6 @@ package mocks
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
"slices"
|
||||
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
@@ -60,6 +59,6 @@ func (m *MockPodCommandExecutor) Exec(arg0 context.Context, arg1, arg2, arg3 str
|
||||
// Exec indicates an expected call of Exec.
|
||||
func (mr *MockPodCommandExecutorMockRecorder) Exec(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := slices.Concat([]any{arg0, arg1, arg2, arg3}, arg4)
|
||||
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockPodCommandExecutor)(nil).Exec), varargs...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user