diff --git a/tsuru/client/deploy.go b/tsuru/client/deploy.go index 51ec3ae1..a2fb6c9a 100644 --- a/tsuru/client/deploy.go +++ b/tsuru/client/deploy.go @@ -732,7 +732,7 @@ Use the --job/-j flag to specify it. if readErr != io.EOF { return fmt.Errorf("error reading response: %v", readErr) } - if strings.HasSuffix(buf.String(), "\nOK\n") { + if strings.HasSuffix(buf.String(), "\nDeploy finished with success!\n") { return nil } return cmd.ErrAbortCommand diff --git a/tsuru/client/deploy_test.go b/tsuru/client/deploy_test.go index f098b17c..cebee9fc 100644 --- a/tsuru/client/deploy_test.go +++ b/tsuru/client/deploy_test.go @@ -570,7 +570,7 @@ func (s *S) TestJobDeployRunUsingDockerfile(c *check.C) { ctx := &cmd.Context{Stdout: io.Discard, Stderr: io.Discard, Args: command.Flags().Args()} trans := &cmdtest.ConditionalTransport{ - Transport: cmdtest.Transport{Message: "deployed\nOK\n", Status: http.StatusOK}, + Transport: cmdtest.Transport{Message: "deployed\nDeploy finished with success!\n", Status: http.StatusOK}, CondFunc: func(req *http.Request) bool { if req.Body != nil { defer req.Body.Close() @@ -598,7 +598,7 @@ func (s *S) TestJobDeployRunUsingDockerfile(c *check.C) { func (s *S) TestJobDeployRunUsingImage(c *check.C) { trans := cmdtest.ConditionalTransport{ - Transport: cmdtest.Transport{Message: "deploy worked\nOK\n", Status: http.StatusOK}, + Transport: cmdtest.Transport{Message: "deploy worked\nDeploy finished with success!\n", Status: http.StatusOK}, CondFunc: func(req *http.Request) bool { if req.Body != nil { defer req.Body.Close() @@ -698,7 +698,7 @@ func (s *S) TestJobDeployRunWithMessage(c *check.C) { c.Assert(err, check.IsNil) trans := cmdtest.ConditionalTransport{ - Transport: cmdtest.Transport{Message: "deploy worked\nOK\n", Status: http.StatusOK}, + Transport: cmdtest.Transport{Message: "deploy worked\nDeploy finished with success!\n", Status: http.StatusOK}, CondFunc: func(req *http.Request) bool { if req.Body != nil { defer req.Body.Close()