File tree Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,17 @@ PROXY_SERVER_IP ?= 127.0.0.1
57
57
58
58
KIND_IMAGE ?= kindest/node:v1.30.2
59
59
CONNECTION_MODE ?= grpc
60
+
61
+ MOCKGEN_VERSION := $(shell mockgen -version)
62
+ DESIRED_MOCKGEN := "v0.5.2"
63
+
60
64
# # --------------------------------------
61
65
# # Testing
62
66
# # --------------------------------------
63
67
.PHONY : mock_gen
64
68
mock_gen :
69
+ echo " Mock gen is set to $( MOCKGEN_VERSION) "
70
+ if [ " $( MOCKGEN_VERSION) " != $( DESIRED_MOCKGEN) ]; then echo " Error need mockgen version $( DESIRED_VERSION) " ; exit 1; fi
65
71
mkdir -p proto/agent/mocks
66
72
mockgen --build_flags=--mod=mod sigs.k8s.io/apiserver-network-proxy/proto/agent AgentService_ConnectServer > proto/agent/mocks/agent_mock.go
67
73
cat hack/go-license-header.txt proto/agent/mocks/agent_mock.go > proto/agent/mocks/agent_mock.licensed.go
Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ Please ensure the go bin directory (usually `~/go/bin`) is in your `PATH`.
61
61
62
62
The [ ``` mockgen ``` ] ( https://github.com/uber-go/mock ) tool must be installed on your system.
63
63
64
- Currently, we are using go.uber.org/mock/
[email protected] .
0
64
+ Currently, we are using go.uber.org/mock/
[email protected] .
2
65
65
66
- ` go install go.uber.org/mock/[email protected] .0 `
66
+ ` go install go.uber.org/mock/[email protected] .2 `
67
67
68
68
### Protoc
69
69
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ require (
11
11
github.com/spf13/pflag v1.0.6
12
12
github.com/stretchr/testify v1.10.0
13
13
go.uber.org/goleak v1.3.0
14
- go.uber.org/mock v0.5.0
14
+ go.uber.org/mock v0.5.2
15
15
golang.org/x/net v0.37.0
16
16
google.golang.org/grpc v1.71.0
17
17
google.golang.org/protobuf v1.36.6
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC
137
137
go.opentelemetry.io/otel/trace v1.34.0 /go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE =
138
138
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto =
139
139
go.uber.org/goleak v1.3.0 /go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE =
140
- go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU =
141
- go.uber.org/mock v0.5.0 /go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM =
140
+ go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko =
141
+ go.uber.org/mock v0.5.2 /go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o =
142
142
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0 =
143
143
go.uber.org/multierr v1.11.0 /go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y =
144
144
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8 =
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ go.opentelemetry.io/otel/trace/embedded
177
177
## explicit; go 1.20
178
178
go.uber.org/goleak
179
179
go.uber.org/goleak/internal/stack
180
- # go.uber.org/mock v0.5.0
180
+ # go.uber.org/mock v0.5.2
181
181
## explicit; go 1.22
182
182
go.uber.org/mock/gomock
183
183
# golang.org/x/net v0.37.0
You can’t perform that action at this time.
0 commit comments