e2e: skip when 'etcdProcess' is nil

This commit is contained in:
Gyu-Ho Lee 2016-10-01 00:13:06 -07:00
parent 37bd0932f7
commit 5c51c600aa

View File

@ -424,6 +424,11 @@ func (epc *etcdProcessCluster) StopAll() (err error) {
func (epc *etcdProcessCluster) Close() error {
err := epc.StopAll()
for _, p := range epc.procs {
// p is nil when newEtcdProcess fails in the middle
// Close still gets called to clean up test data
if p == nil {
continue
}
os.RemoveAll(p.cfg.dataDirPath)
}
return err