aboutsummaryrefslogtreecommitdiff
path: root/tests/extras/gomock/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extras/gomock/BUILD.bazel')
-rw-r--r--tests/extras/gomock/BUILD.bazel33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/extras/gomock/BUILD.bazel b/tests/extras/gomock/BUILD.bazel
new file mode 100644
index 00000000..5b04496f
--- /dev/null
+++ b/tests/extras/gomock/BUILD.bazel
@@ -0,0 +1,33 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test", "gomock")
+
+go_library(
+ name = "client",
+ srcs = [
+ "client.go",
+ ],
+ importpath = "github.com/bazelbuild/rules_go/gomock/client",
+ visibility = ["//visibility:public"],
+ deps = [
+ "@go_googleapis//google/bytestream:bytestream_go_proto",
+ "@org_golang_google_grpc//:grpc",
+ ],
+)
+
+gomock(
+ name = "mocks",
+ out = "client_mock.go",
+ library = ":client",
+ package = "client",
+ source = "client.go",
+ visibility = ["//visibility:public"],
+)
+
+go_test(
+ name = "client_test",
+ srcs = [
+ "client_mock.go",
+ "client_test.go",
+ ],
+ embed = [":client"],
+ deps = ["@com_github_golang_mock//gomock"],
+)