mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Make sure all integration tests have BeforeTest.
The CL disallows to create NewCluster in tests without BeforeTest.
This commit is contained in:
parent
809e7629ed
commit
6657d5907c
@ -1272,6 +1272,15 @@ func NewClusterV3(t testutil.TB, cfg *ClusterConfig) *ClusterV3 {
|
||||
t.Helper()
|
||||
testutil.SkipTestIfShortMode(t, "Cannot create clusters in --short tests")
|
||||
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !strings.HasPrefix(wd, os.TempDir()) {
|
||||
t.Errorf("Working directory '%s' expected to be in temp-dir ('%s')."+
|
||||
"Have you executed integration.BeforeTest(t) ?", wd, os.TempDir())
|
||||
}
|
||||
|
||||
cfg.UseGRPC = true
|
||||
if os.Getenv("CLIENT_DEBUG") != "" {
|
||||
clientv3.SetLogger(grpclog.NewLoggerV2WithVerbosity(os.Stderr, os.Stderr, os.Stderr, 4))
|
||||
|
Loading…
x
Reference in New Issue
Block a user