load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "mock", srcs = [ "backend.go", "glue.go", "glue_checkpoint.go", "importer.go", "kv.go", "mock_cluster.go", "s3iface.go", ], importpath = "github.com/pingcap/tidb/br/pkg/mock", visibility = ["//visibility:public"], deps = [ "//br/pkg/lightning/backend", "//br/pkg/lightning/backend/kv", "//br/pkg/lightning/checkpoints", "//br/pkg/lightning/config", "//br/pkg/lightning/glue", "//br/pkg/lightning/log", "//br/pkg/lightning/verification", "//config", "//domain", "//kv", "//parser", "//parser/ast", "//parser/model", "//server", "//session", "//store/mockstore", "//table", "//types", "//util/sqlexec", "@com_github_aws_aws_sdk_go//aws/request", "@com_github_aws_aws_sdk_go//service/s3", "@com_github_go_sql_driver_mysql//:mysql", "@com_github_golang_mock//gomock", "@com_github_google_uuid//:uuid", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_kvproto//pkg/import_kvpb", "@com_github_pingcap_log//:log", "@com_github_tikv_client_go_v2//testutils", "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_pd_client//:client", "@io_opencensus_go//stats/view", "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//metadata", "@org_uber_go_zap//:zap", ], ) go_test( name = "mock_test", timeout = "short", srcs = ["mock_cluster_test.go"], flaky = True, deps = [ ":mock", "@com_github_stretchr_testify//require", "@org_uber_go_goleak//:goleak", ], )