mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
add unit test for ChartPath
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
This commit is contained in:
parent
8c55de3818
commit
a3d3fa3964
1 changed files with 21 additions and 0 deletions
|
|
@ -117,3 +117,24 @@ func TestIsRoot(t *testing.T) {
|
|||
is.Equal(false, chrt1.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…
Reference in a new issue