From 8d4701bb1dad748167eb0b7277a5178425ecf223 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Tue, 28 Jun 2016 13:06:29 -0700 Subject: [PATCH] etcd-agent: enable GOFAIL_HTTP endpoint --- tools/functional-tester/etcd-agent/agent.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/functional-tester/etcd-agent/agent.go b/tools/functional-tester/etcd-agent/agent.go index 781aae70b..37667950e 100644 --- a/tools/functional-tester/etcd-agent/agent.go +++ b/tools/functional-tester/etcd-agent/agent.go @@ -68,6 +68,7 @@ func newAgent(etcd, logDir string) (*Agent, error) { // start starts a new etcd process with the given args. func (a *Agent) start(args ...string) error { a.cmd = exec.Command(a.cmd.Path, args...) + a.cmd.Env = []string{"GOFAIL_HTTP=:2381"} a.cmd.Stdout = a.logfile a.cmd.Stderr = a.logfile err := a.cmd.Start() @@ -119,16 +120,7 @@ func stopWithSig(cmd *exec.Cmd, sig os.Signal) error { // restart restarts the stopped etcd process. func (a *Agent) restart() error { - a.cmd = exec.Command(a.cmd.Path, a.cmd.Args[1:]...) - a.cmd.Stdout = a.logfile - a.cmd.Stderr = a.logfile - err := a.cmd.Start() - if err != nil { - return err - } - - a.state = stateStarted - return nil + return a.start(a.cmd.Args[1:]...) } func (a *Agent) cleanup() error {