load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "common", srcs = [ "conn.go", "errors.go", "once_error.go", "pause.go", "retry.go", "security.go", "storage.go", "storage_unix.go", "storage_windows.go", "util.go", ], importpath = "github.com/pingcap/tidb/br/pkg/lightning/common", visibility = ["//visibility:public"], deps = [ "//br/pkg/errors", "//br/pkg/httputil", "//br/pkg/lightning/log", "//br/pkg/utils", "//errno", "//parser/model", "//store/driver/error", "//table/tables", "//util", "@com_github_go_sql_driver_mysql//:mysql", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_tikv_client_go_v2//config", "@com_github_tikv_pd_client//:client", "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//codes", "@org_golang_google_grpc//credentials", "@org_golang_google_grpc//status", "@org_golang_x_sys//unix", "@org_uber_go_zap//:zap", ], ) go_test( name = "common_test", timeout = "short", srcs = [ "errors_test.go", "main_test.go", "once_error_test.go", "pause_test.go", "retry_test.go", "security_test.go", "storage_test.go", "util_test.go", ], embed = [":common"], flaky = True, deps = [ "//br/pkg/errors", "//br/pkg/lightning/log", "//errno", "//parser", "//store/driver/error", "//testkit/testsetup", "//util/dbutil", "@com_github_data_dog_go_sqlmock//:go-sqlmock", "@com_github_go_sql_driver_mysql//:mysql", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_stretchr_testify//assert", "@com_github_stretchr_testify//require", "@org_golang_google_grpc//codes", "@org_golang_google_grpc//status", "@org_uber_go_goleak//:goleak", "@org_uber_go_multierr//:multierr", ], )