e2e: remove sh in spawnCmd

certain shells claim the ppid for expect processes which interferes with
signals
release-3.0
Anthony Romano 2016-04-13 00:12:29 -07:00
parent fcb5ba98d0
commit 604a73c833
3 changed files with 3 additions and 4 deletions

View File

@ -284,7 +284,7 @@ func etcdctlLs(clus *etcdProcessCluster, key string, quorum bool) error {
}
func etcdctlWatch(clus *etcdProcessCluster, key, value string, noSync bool) <-chan error {
cmdArgs := append(etcdctlPrefixArgs(clus), "watch", "--after-index 1", key)
cmdArgs := append(etcdctlPrefixArgs(clus), "watch", "--after-index=1", key)
if noSync {
cmdArgs = append(cmdArgs, "--no-sync")
}

View File

@ -513,7 +513,7 @@ func ctlV3Version(cx ctlCtx) error {
}
func ctlV3EpHealth(cx ctlCtx) error {
cmdArgs := append(cx.PrefixArgs(), "endpoint health")
cmdArgs := append(cx.PrefixArgs(), "endpoint", "health")
lines := make([]string, cx.epc.cfg.clusterSize)
for i := range lines {
lines[i] = "is healthy"

View File

@ -416,8 +416,7 @@ func (epc *etcdProcessCluster) Close() (err error) {
}
func spawnCmd(args []string) (*expect.ExpectProcess, error) {
cmdargs := append([]string{"-c"}, strings.Join(args, " "))
return expect.NewExpect("/bin/sh", cmdargs...)
return expect.NewExpect(args[0], args[1:]...)
}
func spawnWithExpect(args []string, expected string) error {