load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "backup", srcs = [ "check.go", "client.go", "metrics.go", "push.go", "schema.go", ], importpath = "github.com/pingcap/tidb/br/pkg/backup", visibility = ["//visibility:public"], deps = [ "//br/pkg/checkpoint", "//br/pkg/checksum", "//br/pkg/conn", "//br/pkg/conn/util", "//br/pkg/errors", "//br/pkg/glue", "//br/pkg/logutil", "//br/pkg/metautil", "//br/pkg/redact", "//br/pkg/rtree", "//br/pkg/storage", "//br/pkg/summary", "//br/pkg/utils", "//ddl", "//distsql", "//kv", "//meta", "//meta/autoid", "//parser/model", "//statistics/handle", "//util", "//util/codec", "//util/ranger", "//util/table-filter", "@com_github_google_btree//:btree", "@com_github_opentracing_opentracing_go//:opentracing-go", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_pingcap_kvproto//pkg/errorpb", "@com_github_pingcap_kvproto//pkg/kvrpcpb", "@com_github_pingcap_kvproto//pkg/metapb", "@com_github_pingcap_log//:log", "@com_github_prometheus_client_golang//prometheus", "@com_github_tikv_client_go_v2//oracle", "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_client_go_v2//txnkv/txnlock", "@com_github_tikv_pd_client//:client", "@org_golang_google_grpc//codes", "@org_golang_google_grpc//status", "@org_golang_x_sync//errgroup", "@org_uber_go_zap//:zap", ], ) go_test( name = "backup_test", timeout = "short", srcs = [ "client_test.go", "main_test.go", "schema_test.go", ], embed = [":backup"], flaky = True, deps = [ "//br/pkg/conn", "//br/pkg/gluetidb", "//br/pkg/metautil", "//br/pkg/mock", "//br/pkg/pdutil", "//br/pkg/storage", "//br/pkg/utils", "//kv", "//parser/model", "//sessionctx/variable", "//tablecodec", "//testkit", "//testkit/testsetup", "//types", "//util/codec", "//util/table-filter", "@com_github_golang_protobuf//proto", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_pingcap_kvproto//pkg/encryptionpb", "@com_github_pingcap_kvproto//pkg/errorpb", "@com_github_stretchr_testify//require", "@com_github_tikv_client_go_v2//oracle", "@com_github_tikv_client_go_v2//testutils", "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_client_go_v2//txnkv/txnlock", "@com_github_tikv_pd_client//:client", "@io_opencensus_go//stats/view", "@org_uber_go_goleak//:goleak", ], )