test(helm): Adding case for versions short flag

When git sha is empty if being built from tarball running 'helm version
--short' should just ignore '--short' since sha is empty. Adding test
to ensure this is the case.

Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
pull/4609/head
Robert James Hernandez 7 years ago
parent d8ca7e69f1
commit aa6a3b1122

@ -57,6 +57,12 @@ func TestVersion(t *testing.T) {
flags: []string{"--template", "{{ .Client.SemVer }} {{ .Server.SemVer }}"},
expected: lver + " " + sver,
},
{
name: "client short empty git",
args: []string{},
flags: []string{"-c", "--short"},
expected: lver,
},
}
settings.TillerHost = "fake-localhost"
runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command {

Loading…
Cancel
Save