Skip to content

Commit c98dfcd

Browse files
Merge pull request #18 from luchihoratiu/CT-190-fixed
(CT-190) Remove info message from JSON payload
2 parents 1138c77 + 878e94e commit c98dfcd

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

app/puppet-code/deploy.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,5 @@ func writeDeployResult(args *DeployArgs, payload []*operations.DeployOKBodyItems
7777
log.Error(err.Error())
7878
}
7979

80-
info := []byte(fmt.Sprintf("Found %d environments.\n", len(payload)))
81-
return append(info, resultPayload...)
80+
return resultPayload
8281
}

app/puppet-code/deploy_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package app
33
import (
44
"context"
55
"errors"
6-
"fmt"
76
"testing"
87

98
"github.com/golang/mock/gomock"
@@ -82,8 +81,7 @@ func TestDeployStatusSucces(t *testing.T) {
8281
puppetCode.Client = api
8382
res, err := puppetCode.DeployWithErrorDetails(&args)
8483
expected, _ := json.MarshalIndent(result.Payload, "", " ")
85-
info := []byte(fmt.Sprintf("Found %d environments.\n", 0))
86-
assert.Equal(append(info, expected...), res)
84+
assert.Equal(expected, res)
8785
assert.Nil(err)
8886
}
8987

0 commit comments

Comments
 (0)