load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "keyspace", srcs = [ "builtin_users.go", "keyspace.go", "username_policy.go", ], importpath = "github.com/pingcap/tidb/pkg/keyspace", visibility = ["//visibility:public"], deps = [ "//pkg/config", "//pkg/metrics", "//pkg/parser/mysql", "//pkg/util/codec", "//pkg/util/dbterror/exeerrors", "//pkg/util/errmsg", "@com_github_pingcap_kvproto//pkg/keyspacepb", "@com_github_pingcap_kvproto//pkg/kvrpcpb", "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_pd_client//:client", "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//keepalive", "@org_uber_go_zap//:zap", "@org_uber_go_zap//zapcore", ], ) go_test( name = "keyspace_test", timeout = "short", srcs = [ "builtin_users_test.go", "keyspace_test.go", ], embed = [":keyspace"], flaky = True, shard_count = 6, deps = [ "//pkg/config", "//pkg/parser/mysql", "@com_github_stretchr_testify//assert", "@com_github_stretchr_testify//require", ], )