From 7241f496d9c84d8a0d7ba3c60c6a906e030a05de Mon Sep 17 00:00:00 2001 From: Otokaze Date: Sun, 29 Sep 2019 12:25:40 +0800 Subject: [PATCH] delete *.bazel files --- pkg/cache/memcache/main_test.go | 17 +++++----- pkg/cache/memcache/test/BUILD.bazel | 48 ----------------------------- 2 files changed, 7 insertions(+), 58 deletions(-) delete mode 100644 pkg/cache/memcache/test/BUILD.bazel diff --git a/pkg/cache/memcache/main_test.go b/pkg/cache/memcache/main_test.go index 064dafd9b..5d40535a6 100644 --- a/pkg/cache/memcache/main_test.go +++ b/pkg/cache/memcache/main_test.go @@ -1,15 +1,13 @@ package memcache import ( - "flag" "log" "os" "testing" "time" - "go-common/library/container/pool" - "go-common/library/testing/lich" - xtime "go-common/library/time" + "github.com/bilibili/kratos/pkg/container/pool" + xtime "github.com/bilibili/kratos/pkg/time" ) var testConnASCII Conn @@ -70,12 +68,12 @@ func setupTestPool(addr string) { } func TestMain(m *testing.M) { - flag.Set("f", "./test/docker-compose.yaml") - flag.Parse() - if err := lich.Setup(); err != nil { - panic(err) + testMemcacheAddr = os.Getenv("TEST_MEMCACHE_ADDR") + if testExampleAddr == "" { + log.Print("TEST_MEMCACHE_ADDR not provide skip test.") + // ignored test. + os.Exit(0) } - testMemcacheAddr = "127.0.0.1:11211" setupTestConnASCII(testMemcacheAddr) setupTestMemcache(testMemcacheAddr) setupTestPool(testMemcacheAddr) @@ -83,6 +81,5 @@ func TestMain(m *testing.M) { testExampleAddr = testMemcacheAddr ret := m.Run() - lich.Teardown() os.Exit(ret) } diff --git a/pkg/cache/memcache/test/BUILD.bazel b/pkg/cache/memcache/test/BUILD.bazel deleted file mode 100644 index 0bf9680e6..000000000 --- a/pkg/cache/memcache/test/BUILD.bazel +++ /dev/null @@ -1,48 +0,0 @@ -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) -load( - "@io_bazel_rules_go//proto:def.bzl", - "go_proto_library", -) - -go_library( - name = "go_default_library", - srcs = [], - embed = [":proto_go_proto"], - importpath = "go-common/library/cache/memcache/test", - tags = ["automanaged"], - visibility = ["//visibility:public"], - deps = ["@com_github_golang_protobuf//proto:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -proto_library( - name = "test_proto", - srcs = ["test.proto"], - import_prefix = "go-common/library/cache/memcache/test", - strip_import_prefix = "", - tags = ["automanaged"], -) - -go_proto_library( - name = "proto_go_proto", - compilers = ["@io_bazel_rules_go//proto:go_proto"], - importpath = "go-common/library/cache/memcache/test", - proto = ":test_proto", - tags = ["automanaged"], -)