Merge pull request #6618 from heyitsanthony/fix-e2e-err-leak

e2e: close process if spawnWithExpects fails
This commit is contained in:
Anthony Romano 2016-10-11 11:30:28 -07:00 committed by GitHub
commit a7247b3c7e

View File

@ -510,6 +510,7 @@ func spawnWithExpects(args []string, xs ...string) error {
for {
l, err := proc.ExpectFunc(lineFunc)
if err != nil {
proc.Close()
return fmt.Errorf("%v (expected %q, got %q)", err, txt, lines)
}
lines = append(lines, l)