mirror of
https://github.com/go-kratos/kratos.git
synced 2025-02-09 13:36:57 +02:00
delete *.bazel files
This commit is contained in:
parent
642aa3dea5
commit
7241f496d9
17
pkg/cache/memcache/main_test.go
vendored
17
pkg/cache/memcache/main_test.go
vendored
@ -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)
|
||||
}
|
||||
|
48
pkg/cache/memcache/test/BUILD.bazel
vendored
48
pkg/cache/memcache/test/BUILD.bazel
vendored
@ -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"],
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user