| load("//bazel/go:go_test.bzl", "go_test") |
| load("@io_bazel_rules_go//go:def.bzl", "go_library") |
| |
| go_library( |
| name = "rpc", |
| srcs = [ |
| "rpc.go", |
| "rpc.pb.go", |
| "rpc.twirp.go", |
| ], |
| importpath = "go.skia.org/infra/task_scheduler/go/rpc", |
| visibility = ["//visibility:public"], |
| deps = [ |
| "//go/allowed", |
| "//go/git/repograph", |
| "//go/now", |
| "//go/sklog", |
| "//go/swarming", |
| "//go/twirp_auth", |
| "//task_scheduler/go/db", |
| "//task_scheduler/go/skip_tasks", |
| "//task_scheduler/go/task_cfg_cache", |
| "//task_scheduler/go/types", |
| "@com_github_golang_protobuf//jsonpb:go_default_library_gen", |
| "@com_github_golang_protobuf//proto:go_default_library", |
| "@com_github_twitchtv_twirp//:twirp", |
| "@com_github_twitchtv_twirp//ctxsetters", |
| "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", |
| "@org_golang_google_protobuf//reflect/protoreflect", |
| "@org_golang_google_protobuf//runtime/protoimpl", |
| "@org_golang_google_protobuf//types/known/timestamppb", |
| ], |
| ) |
| |
| go_test( |
| name = "rpc_test", |
| srcs = ["rpc_test.go"], |
| embed = [":rpc"], |
| deps = [ |
| "//go/allowed", |
| "//go/deepequal/assertdeep", |
| "//go/firestore/testutils", |
| "//go/git", |
| "//go/git/repograph", |
| "//go/git/testutils/mem_git", |
| "//go/gitstore", |
| "//go/gitstore/mem_gitstore", |
| "//go/swarming/mocks", |
| "//go/testutils", |
| "//go/testutils/unittest", |
| "//task_scheduler/go/db/memory", |
| "//task_scheduler/go/skip_tasks", |
| "//task_scheduler/go/specs", |
| "//task_scheduler/go/task_cfg_cache", |
| "//task_scheduler/go/task_cfg_cache/testutils", |
| "//task_scheduler/go/types", |
| "@com_github_stretchr_testify//require", |
| "@org_chromium_go_luci//common/api/swarming/swarming/v1:swarming", |
| "@org_golang_google_protobuf//types/known/timestamppb", |
| ], |
| ) |