mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
e2e: remove sh in spawnCmd
certain shells claim the ppid for expect processes which interferes with signals
This commit is contained in:
parent
fcb5ba98d0
commit
604a73c833
@ -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")
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user