fix(helm): fix incorrect yaml output format of get hooks command (#4684)

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
pull/4894/head
adshmh 6 years ago committed by Matthew Fisher
parent 40ef9c0f70
commit 1801fa0074

@ -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
}

@ -17,6 +17,7 @@ limitations under the License.
package main
import (
"fmt"
"io"
"testing"
@ -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"})},
},

Loading…
Cancel
Save