blob: b0876365b7243e6adfe0eaaa5b996b517cbaa595 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "sqlshortcutstore",
srcs = ["sqlshortcutstore.go"],
importpath = "go.skia.org/infra/perf/go/shortcut/sqlshortcutstore",
visibility = ["//visibility:public"],
deps = [
"//go/query",
"//go/skerr",
"//go/sklog",
"//perf/go/shortcut",
"@com_github_jackc_pgx_v4//pgxpool",
],
)
go_test(
name = "sqlshortcutstore_test",
srcs = ["sqlshortcutstore_test.go"],
data = ["//perf/migrations:cockroachdb"],
embed = [":sqlshortcutstore"],
# 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 = [
"//go/testutils/unittest",
"//perf/go/shortcut/shortcuttest",
"//perf/go/sql/sqltest",
"@com_github_stretchr_testify//require",
],
)