aboutsummaryrefslogtreecommitdiffstats
path: root/client/go/cmd
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2022-08-19 10:59:35 +0200
committerHarald Musum <musum@yahooinc.com>2022-08-19 10:59:35 +0200
commit54c676642b9a17fb3d1d995e0c9592440e9bc460 (patch)
tree128b05a0d8e8db4dc3db91d2f9b5f1b389deefb8 /client/go/cmd
parentf490b0591d0de1bcb0a714798716b56d3e9c8534 (diff)
Handle response from prepare properly
Diffstat (limited to 'client/go/cmd')
-rw-r--r--client/go/cmd/deploy.go1
-rw-r--r--client/go/cmd/deploy_test.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/client/go/cmd/deploy.go b/client/go/cmd/deploy.go
index e72667e49b6..012570c5471 100644
--- a/client/go/cmd/deploy.go
+++ b/client/go/cmd/deploy.go
@@ -132,6 +132,7 @@ func newPrepareCmd(cli *CLI) *cobra.Command {
return fmt.Errorf("could not write session id: %w", err)
}
cli.printSuccess("Prepared ", color.CyanString(pkg.Path), " with session ", result.ID)
+ printPrepareLog(cli.Stderr, result)
return nil
},
}
diff --git a/client/go/cmd/deploy_test.go b/client/go/cmd/deploy_test.go
index fe3e0ca0467..236ae74f47e 100644
--- a/client/go/cmd/deploy_test.go
+++ b/client/go/cmd/deploy_test.go
@@ -121,7 +121,7 @@ func assertDeploy(applicationPackage string, arguments []string, t *testing.T) {
func assertPrepare(applicationPackage string, arguments []string, t *testing.T) {
t.Helper()
client := &mock.HTTPClient{}
- client.NextResponseString(200, `{"session-id":"42"}`)
+ client.NextResponseString(200, `{"session-id":"42","message":"Session 42 for tenant 'default' prepared.","log":[{"level":"WARNING","message":"Warning message 1","time": 1430134091319}]}`)
cli, stdout, _ := newTestCLI(t)
cli.httpClient = client
assert.Nil(t, cli.Run(arguments...))