Skip to content

Commit

Permalink
fix(helm): fix incorrect yaml output format of get hooks command (#4684)
Browse files Browse the repository at this point in the history
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
  • Loading branch information
adshmh authored and Matthew Fisher committed Nov 7, 2018
1 parent 40ef9c0 commit 1801fa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/helm/get_hooks.go
Expand Up @@ -75,7 +75,7 @@ func (g *getHooksCmd) run() error {
}

for _, hook := range res.Release.Hooks {
fmt.Fprintf(g.out, "---\n# %s\n%s", hook.Name, hook.Manifest)
fmt.Fprintf(g.out, "---\n# %s\n%s\n", hook.Name, hook.Manifest)
}
return nil
}
3 changes: 2 additions & 1 deletion cmd/helm/get_hooks_test.go
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package main

import (
"fmt"
"io"
"testing"

Expand All @@ -31,7 +32,7 @@ func TestGetHooks(t *testing.T) {
{
name: "get hooks with release",
args: []string{"aeneas"},
expected: helm.MockHookTemplate,
expected: fmt.Sprintf("---\n# %s\n%s\n", "pre-install-hook", helm.MockHookTemplate),
resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "aeneas"}),
rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "aeneas"})},
},
Expand Down

0 comments on commit 1801fa0

Please sign in to comment.