Unverified Commit 8537bb5c authored by Sebastien Plisson's avatar Sebastien Plisson Committed by Matthew Fisher

Added test cases for chart present under charts folder

Signed-off-by: 's avatarSebastien Plisson <sebastien.plisson@gmail.com>
parent 21edd808
......@@ -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 {
......
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"}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment