blob: 557fc29955386fbc9517ac71aee441f5b32f7f30 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
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/testutils/unittest",
"@com_github_stretchr_testify//require",
"@com_google_cloud_go_datastore//:datastore",
],
)