blob: c6dea64de9d2eb3dc8e5b9337ee6cc13fc810c67 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "autoroll-google3_lib",
srcs = [
"google3.go",
"main.go",
],
importpath = "go.skia.org/infra/autoroll/go/autoroll-google3",
visibility = ["//visibility:private"],
deps = [
"//autoroll/go/config",
"//autoroll/go/modes",
"//autoroll/go/recent_rolls",
"//autoroll/go/state_machine",
"//autoroll/go/status",
"//autoroll/go/strategy",
"//go/auth",
"//go/autoroll",
"//go/cleanup",
"//go/common",
"//go/ds",
"//go/gitiles",
"//go/httputils",
"//go/jsonutils",
"//go/metrics2",
"//go/skerr",
"//go/sklog",
"//go/util",
"//go/webhook",
"@com_github_gorilla_mux//:mux",
"@com_google_cloud_go_datastore//:datastore",
"@org_golang_google_api//option",
"@org_golang_google_protobuf//encoding/prototext",
"@org_golang_x_oauth2//:oauth2",
],
)
go_binary(
name = "autoroll-google3",
embed = [":autoroll-google3_lib"],
visibility = ["//visibility:public"],
)
go_test(
name = "autoroll-google3_test",
srcs = ["google3_test.go"],
embed = [":autoroll-google3_lib"],
tags = [
# Ensure that no other tests are running at the same time.
#
# This prevents "too much contention on these datastore entities" errors due to concurrent
# Datastore queries from multiple tests running in parallel.
#
# Reference: https://docs.bazel.build/versions/master/test-encyclopedia.html#tag-conventions
"exclusive",
],
deps = [
"//autoroll/go/config",
"//autoroll/go/recent_rolls",
"//go/autoroll",
"//go/deepequal/assertdeep",
"//go/ds",
"//go/ds/testutil",
"//go/git",
"//go/git/testutils",
"//go/gitiles/testutils",
"//go/jsonutils",
"//go/mockhttpclient",
"//go/testutils/unittest",
"@com_github_stretchr_testify//require",
],
)