Add unit test for pkg/chart/chart.go

Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
pull/7814/head
Hu Shuai 5 years ago
parent 193850a9e2
commit 9ab40a26af

@ -78,3 +78,21 @@ func TestSaveChartNoRawData(t *testing.T) {
is.Equal([]*File(nil), res.Raw)
}
func TestMetadata(t *testing.T) {
chrt := Chart{
Metadata: &Metadata{
Name: "foo.yaml",
AppVersion: "1.0.0",
APIVersion: "v2",
Version: "1.0.0",
Type: "application",
},
}
is := assert.New(t)
is.Equal("foo.yaml", chrt.Name())
is.Equal("1.0.0", chrt.AppVersion())
is.Equal(nil, chrt.Validate())
}

Loading…
Cancel
Save