add unit test for ChartPath

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
Signed-off-by: Matheus Hunsche <matheus.hunsche@ifood.com.br>
pull/8840/head
Zhou Hao 6 years ago committed by Matheus Hunsche
parent 764cabf056
commit 273270ecfa

@ -117,3 +117,24 @@ func TestIsRoot(t *testing.T) {
is.Equal(false, chrt1.IsRoot()) is.Equal(false, chrt1.IsRoot())
is.Equal(true, chrt2.IsRoot()) is.Equal(true, chrt2.IsRoot())
} }
func TestChartPath(t *testing.T) {
chrt1 := Chart{
parent: &Chart{
Metadata: &Metadata{
Name: "foo",
},
},
}
chrt2 := Chart{
Metadata: &Metadata{
Name: "foo",
},
}
is := assert.New(t)
is.Equal("foo.", chrt1.ChartPath())
is.Equal("foo", chrt2.ChartPath())
}

Loading…
Cancel
Save