Files
tidb/lightning/pkg/server/BUILD.bazel

74 lines
2.3 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "server",
srcs = [
"lightning.go",
"run_options.go",
"sigusr1_other.go",
"sigusr1_unix.go",
],
importpath = "github.com/pingcap/tidb/lightning/pkg/server",
visibility = ["//visibility:public"],
deps = [
"//br/pkg/restore/split",
"//br/pkg/storage",
"//br/pkg/version/build",
"//lightning/pkg/importer",
"//lightning/pkg/web",
"//pkg/expression",
"//pkg/lightning/backend/local",
"//pkg/lightning/checkpoints",
"//pkg/lightning/common",
"//pkg/lightning/config",
"//pkg/lightning/log",
"//pkg/lightning/metric",
"//pkg/lightning/mydump",
"//pkg/lightning/tikv",
"//pkg/planner/core",
"//pkg/util",
"//pkg/util/logutil",
"//pkg/util/promutil",
"//pkg/util/redact",
"@com_github_go_sql_driver_mysql//:mysql",
"@com_github_google_uuid//:uuid",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_kvproto//pkg/import_sstpb",
"@com_github_pingcap_kvproto//pkg/metapb",
"@com_github_prometheus_client_golang//prometheus",
"@com_github_prometheus_client_golang//prometheus/collectors",
"@com_github_prometheus_client_golang//prometheus/promhttp",
"@com_github_shurcool_httpgzip//:httpgzip",
"@com_github_tikv_pd_client//http",
"@org_uber_go_atomic//:atomic",
"@org_uber_go_zap//:zap",
"@org_uber_go_zap//zapcore",
],
)
go_test(
name = "server_test",
timeout = "short",
srcs = [
"lightning_serial_test.go",
"lightning_server_serial_test.go",
"main_test.go",
],
embed = [":server"],
flaky = True,
shard_count = 7,
deps = [
"//lightning/pkg/web",
"//pkg/lightning/checkpoints",
"//pkg/lightning/config",
"//pkg/lightning/log",
"//pkg/lightning/mydump",
"@com_github_data_dog_go_sqlmock//:go-sqlmock",
"@com_github_docker_go_units//:go-units",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_stretchr_testify//require",
],
)