blob: 25a633da2592aa700b88d710995a03272298e4b5 [file] [log] [blame] [edit]
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "ds",
srcs = ["ds.go"],
importpath = "go.skia.org/infra/go/ds",
visibility = ["//visibility:public"],
deps = [
"//go/auth",
"//go/emulators",
"//go/skerr",
"//go/sklog",
"//go/util",
"@com_google_cloud_go_datastore//:datastore",
"@org_golang_google_api//iterator",
"@org_golang_google_api//option",
"@org_golang_x_sync//errgroup",
],
)
go_test(
name = "ds_test",
srcs = ["ds_test.go"],
embed = [":ds"],
# Datastore tests fail intermittently when running locally (i.e. not on RBE) due to tests
# running in parallel against the same Datastore emulator instance:
#
# rpc error: code = Aborted desc = too much contention on these datastore entities.
#
# 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/emulators/gcp_emulator",
"@com_github_stretchr_testify//require",
"@com_google_cloud_go_datastore//:datastore",
],
)