84 lines
2.4 KiB
Python
84 lines
2.4 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "testkit",
|
|
srcs = [
|
|
"asynctestkit.go",
|
|
"db_driver.go",
|
|
"dbtestkit.go",
|
|
"mocksessionmanager.go",
|
|
"mockstore.go",
|
|
"result.go",
|
|
"stepped.go",
|
|
"testkit.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/pkg/testkit",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pkg/config",
|
|
"//pkg/config/kerneltype",
|
|
"//pkg/ddl",
|
|
"//pkg/ddl/schematracker",
|
|
"//pkg/domain",
|
|
"//pkg/expression",
|
|
"//pkg/infoschema/issyncer/mdldef",
|
|
"//pkg/keyspace",
|
|
"//pkg/kv",
|
|
"//pkg/meta/model",
|
|
"//pkg/parser/ast",
|
|
"//pkg/parser/auth",
|
|
"//pkg/parser/mysql",
|
|
"//pkg/parser/terror",
|
|
"//pkg/planner/core",
|
|
"//pkg/planner/core/resolve",
|
|
"//pkg/resourcemanager",
|
|
"//pkg/session",
|
|
"//pkg/session/sessionapi",
|
|
"//pkg/session/sessmgr",
|
|
"//pkg/session/txninfo",
|
|
"//pkg/sessionctx/vardef",
|
|
"//pkg/sessionctx/variable",
|
|
"//pkg/statistics/util",
|
|
"//pkg/store",
|
|
"//pkg/store/driver",
|
|
"//pkg/store/helper",
|
|
"//pkg/store/mockstore",
|
|
"//pkg/store/mockstore/teststore",
|
|
"//pkg/testkit/testenv",
|
|
"//pkg/types",
|
|
"//pkg/util",
|
|
"//pkg/util/breakpoint",
|
|
"//pkg/util/chunk",
|
|
"//pkg/util/gctuner",
|
|
"//pkg/util/intest",
|
|
"//pkg/util/logutil",
|
|
"//pkg/util/metricsutil",
|
|
"//pkg/util/sqlexec",
|
|
"@com_github_gorilla_mux//:mux",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_pingcap_failpoint//:failpoint",
|
|
"@com_github_pingcap_kvproto//pkg/keyspacepb",
|
|
"@com_github_prometheus_client_golang//prometheus/promhttp",
|
|
"@com_github_stretchr_testify//assert",
|
|
"@com_github_stretchr_testify//require",
|
|
"@com_github_tikv_client_go_v2//tikv",
|
|
"@com_github_tikv_client_go_v2//tikvrpc",
|
|
"@io_opencensus_go//stats/view",
|
|
"@org_uber_go_atomic//:atomic",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "testkit_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"db_driver_test.go",
|
|
"testkit_test.go",
|
|
],
|
|
embed = [":testkit"],
|
|
flaky = True,
|
|
shard_count = 2,
|
|
deps = ["@com_github_stretchr_testify//require"],
|
|
)
|