Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version control and vendor mockgen #1802

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions internal/computeagent/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//
// A mock service under `mock` is used for unit testing the various services
// used for ncproxy.
//
// The mock service is compiled using the following command:
//
// mockgen -source="computeagent.pb.go" -package="computeagent_mock" > mock\computeagent_mock.pb.go
package computeagent

//go:generate go run github.com/golang/mock/mockgen -source=computeagent.pb.go -package=computeagent_mock -destination=mock\computeagent_mock.pb.go
7 changes: 2 additions & 5 deletions pkg/ncproxy/nodenetsvc/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
//
// A mock service under `mock` is used for unit testing the various services
// used for ncproxy.
//
// The mock service is compiled using the following command:
//
// mockgen -source="nodenetsvc.pb.go" -package="nodenetsvc_mock" > mock\nodenetsvc_mock.pb.go

package v1

//go:generate go run github.com/golang/mock/mockgen -source=nodenetsvc.pb.go -package=nodenetsvc_v1_mock -destination=mock\nodenetsvc_mock.pb.go
1 change: 1 addition & 0 deletions test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ require (
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/gogo/googleapis v1.4.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down
1 change: 1 addition & 0 deletions test/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down
10 changes: 9 additions & 1 deletion tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@

package hcsshim

import _ "github.com/Microsoft/go-winio/tools/mkwinsyscall"
import (
// for go generate directives

// generate Win32 API code
_ "github.com/Microsoft/go-winio/tools/mkwinsyscall"

// mock gRPC client and servers
_ "github.com/golang/mock/mockgen"
)
Loading