blob: 82513618872e6ad07a08f53cec22f9e91dcd1dbe [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "sqlalertstore",
srcs = ["sqlalertstore.go"],
importpath = "go.skia.org/infra/perf/go/alerts/sqlalertstore",
visibility = ["//visibility:public"],
deps = [
"//go/skerr",
"//go/sql/pool",
"//perf/go/alerts",
],
)
go_test(
name = "sqlalertstore_test",
srcs = ["sqlalertstore_test.go"],
data = ["//perf/migrations:cockroachdb"],
embed = [":sqlalertstore"],
# Perf CockroachDB tests fail intermittently when running locally (i.e. not on RBE) due to tests
# running in parallel against the same CockroachDB instance:
#
# pq: relation "schema_lock" already exists
#
# This is not an issue on RBE because each test target starts its own emulator instance.
#
# https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests
flaky = True,
deps = [
"//perf/go/alerts/alertstest",
"//perf/go/sql/sqltest",
"@com_github_stretchr_testify//require",
],
)