blob: 50b82f7b5212c846b4333ba5fdb851a39cdf01eb [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "tryjobs",
srcs = ["tryjobs.go"],
importpath = "go.skia.org/infra/task_scheduler/go/tryjobs",
visibility = ["//visibility:public"],
deps = [
"//go/buildbucket",
"//go/cleanup",
"//go/gerrit",
"//go/git/repograph",
"//go/human",
"//go/metrics2",
"//go/now",
"//go/pubsub",
"//go/skerr",
"//go/sklog",
"//go/util",
"//task_scheduler/go/cacher",
"//task_scheduler/go/db",
"//task_scheduler/go/db/cache",
"//task_scheduler/go/job_creation/buildbucket_taskbackend",
"//task_scheduler/go/task_cfg_cache",
"//task_scheduler/go/types",
"@com_github_hashicorp_go_multierror//:go-multierror",
"@com_google_cloud_go_pubsub//:pubsub",
"@io_opencensus_go//trace",
"@org_chromium_go_luci//buildbucket/proto",
"@org_golang_google_protobuf//encoding/prototext",
"@org_golang_google_protobuf//proto",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)
go_test(
name = "tryjobs_test",
srcs = [
"tryjobs_test.go",
"utils_test.go",
],
data = ["//infra/config:recipes.cfg"],
embed = [":tryjobs"],
deps = [
"//go/buildbucket/mocks",
"//go/deepequal/assertdeep",
"//go/gerrit",
"//go/git",
"//go/git/repograph",
"//go/mockhttpclient",
"//go/now",
"//go/pubsub/mocks",
"//go/sktest",
"//go/testutils",
"//go/vcsinfo",
"//task_scheduler/go/cacher/mocks",
"//task_scheduler/go/db",
"//task_scheduler/go/db/cache",
"//task_scheduler/go/db/memory",
"//task_scheduler/go/job_creation/buildbucket_taskbackend",
"//task_scheduler/go/task_cfg_cache/mocks",
"//task_scheduler/go/task_cfg_cache/testutils",
"//task_scheduler/go/types",
"//task_scheduler/go/window",
"@com_github_stretchr_testify//mock",
"@com_github_stretchr_testify//require",
"@com_google_cloud_go_pubsub//:pubsub",
"@org_chromium_go_luci//buildbucket/proto",
"@org_golang_google_protobuf//proto",
],
)