Added test cases for chart present under charts folder

Signed-off-by: Sebastien Plisson <sebastien.plisson@gmail.com>
pull/6578/head
Sebastien Plisson 7 years ago committed by Matthew Fisher
parent 21edd808b6
commit 8537bb5c42
No known key found for this signature in database
GPG Key ID: 92AA783CBAAE8E3B

@ -156,6 +156,13 @@ func TestGetRepoNames(t *testing.T) {
},
expect: map[string]string{"oedipus-rex": "testing"},
},
{
name: "repo from local chart under charts path",
req: []*chartutil.Dependency{
{Name: "local-subchart", Repository: ""},
},
expect: map[string]string{},
},
}
for _, tt := range tests {

@ -0,0 +1,3 @@
description: A Helm chart for Kubernetes
name: local-subchart
version: 0.1.0

@ -90,6 +90,33 @@ func TestResolve(t *testing.T) {
},
err: true,
},
{
name: "repo from valid path under charts path",
req: &chartutil.Requirements{
Dependencies: []*chartutil.Dependency{
{Name: "localdependency", Repository: "", Version: "0.1.0"},
},
},
expect: &chartutil.RequirementsLock{
Dependencies: []*chartutil.Dependency{
{Name: "localdependency", Repository: "", Version: "0.1.0"},
},
},
},
{
name: "repo from valid path under charts path",
req: &chartutil.Requirements{
Dependencies: []*chartutil.Dependency{
{Name: "inexistentdependency", Repository: "", Version: "0.1.0"},
},
},
expect: &chartutil.RequirementsLock{
Dependencies: []*chartutil.Dependency{
{Name: "inexistentlocaldependency", Repository: "", Version: "0.1.0"},
},
},
err: true,
},
}
repoNames := map[string]string{"alpine": "kubernetes-charts", "redis": "kubernetes-charts"}

Loading…
Cancel
Save