blob: f32382cc982e392975e78b00179699087566f454 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "git",
srcs = ["git.go"],
importpath = "go.skia.org/infra/perf/go/git",
visibility = ["//visibility:public"],
deps = [
"//go/auth",
"//go/gitauth",
"//go/gitiles",
"//go/human",
"//go/metrics2",
"//go/skerr",
"//go/sklog",
"//perf/go/config",
"//perf/go/types",
"@com_github_hashicorp_golang_lru//:golang-lru",
"@com_github_jackc_pgx_v4//:pgx",
"@com_github_jackc_pgx_v4//pgxpool",
"@io_opencensus_go//trace",
],
)
go_test(
name = "git_test",
srcs = ["git_test.go"],
data = ["//perf/migrations:cockroachdb"],
embed = [":git"],
tags = [
# Ensure that no other tests are running at the same time.
#
# This prevents 'pq: relation "schema_lock" already exists' errors due to concurrent
# CockroachDB queries from multiple tests running in parallel.
#
# Reference: https://docs.bazel.build/versions/master/test-encyclopedia.html#tag-conventions
"exclusive",
],
deps = [
"//go/git/testutils",
"//go/testutils/unittest",
"//perf/go/config",
"//perf/go/git/gittest",
"//perf/go/types",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)