mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
functional/tester: prevent embedded etcd running with failpoints
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
4f45f5d9dd
commit
c8d08a8898
@ -44,7 +44,18 @@ func read(lg *zap.Logger, fpath string) (*Cluster, error) {
|
||||
return nil, fmt.Errorf("len(clus.Members) expects at least 3, got %d", len(clus.Members))
|
||||
}
|
||||
|
||||
failpointsEnabled := false
|
||||
for _, c := range clus.Tester.Cases {
|
||||
if c == rpcpb.Case_FAILPOINTS.String() {
|
||||
failpointsEnabled = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for i, mem := range clus.Members {
|
||||
if mem.EtcdExec == "embed" && failpointsEnabled {
|
||||
return nil, errors.New("EtcdExec 'embed' cannot be run with failpoints enabled")
|
||||
}
|
||||
if mem.BaseDir == "" {
|
||||
return nil, fmt.Errorf("BaseDir cannot be empty (got %q)", mem.BaseDir)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user