Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
8537bb5c
Unverified
Commit
8537bb5c
authored
Feb 27, 2018
by
Sebastien Plisson
Committed by
Matthew Fisher
Oct 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test cases for chart present under charts folder
Signed-off-by:
Sebastien Plisson
<
sebastien.plisson@gmail.com
>
parent
21edd808
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
manager_test.go
pkg/downloader/manager_test.go
+7
-0
Chart.yaml
pkg/downloader/testdata/local-subchart/Chart.yaml
+3
-0
resolver_test.go
pkg/resolver/resolver_test.go
+27
-0
No files found.
pkg/downloader/manager_test.go
View file @
8537bb5c
...
@@ -156,6 +156,13 @@ func TestGetRepoNames(t *testing.T) {
...
@@ -156,6 +156,13 @@ func TestGetRepoNames(t *testing.T) {
},
},
expect
:
map
[
string
]
string
{
"oedipus-rex"
:
"testing"
},
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
{
for
_
,
tt
:=
range
tests
{
...
...
pkg/downloader/testdata/local-subchart/Chart.yaml
0 → 100644
View file @
8537bb5c
description
:
A Helm chart for Kubernetes
name
:
local-subchart
version
:
0.1.0
pkg/resolver/resolver_test.go
View file @
8537bb5c
...
@@ -90,6 +90,33 @@ func TestResolve(t *testing.T) {
...
@@ -90,6 +90,33 @@ func TestResolve(t *testing.T) {
},
},
err
:
true
,
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"
}
repoNames
:=
map
[
string
]
string
{
"alpine"
:
"kubernetes-charts"
,
"redis"
:
"kubernetes-charts"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment