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
f80a7aa3
Commit
f80a7aa3
authored
May 25, 2017
by
Sushil Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for install/upgrade to test bad requirements.yaml
parent
18f900e4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
0 deletions
+73
-0
install_test.go
cmd/helm/install_test.go
+6
-0
.helmignore
...lm/testdata/testcharts/chart-bad-requirements/.helmignore
+21
-0
Chart.yaml
...elm/testdata/testcharts/chart-bad-requirements/Chart.yaml
+3
-0
.helmignore
...rts/chart-bad-requirements/charts/reqsubchart/.helmignore
+21
-0
Chart.yaml
...arts/chart-bad-requirements/charts/reqsubchart/Chart.yaml
+3
-0
values.yaml
...rts/chart-bad-requirements/charts/reqsubchart/values.yaml
+4
-0
requirements.yaml
...tdata/testcharts/chart-bad-requirements/requirements.yaml
+4
-0
values.yaml
...lm/testdata/testcharts/chart-bad-requirements/values.yaml
+4
-0
upgrade_test.go
cmd/helm/upgrade_test.go
+7
-0
No files found.
cmd/helm/install_test.go
View file @
f80a7aa3
...
...
@@ -138,6 +138,12 @@ func TestInstall(t *testing.T) {
args
:
[]
string
{
"testdata/testcharts/chart-missing-deps"
},
err
:
true
,
},
// Install, chart with bad requirements.yaml in /charts
{
name
:
"install chart with bad requirements.yaml"
,
args
:
[]
string
{
"testdata/testcharts/chart-bad-requirements"
},
err
:
true
,
},
}
runReleaseCases
(
t
,
tests
,
func
(
c
*
fakeReleaseClient
,
out
io
.
Writer
)
*
cobra
.
Command
{
...
...
cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore
0 → 100644
View file @
f80a7aa3
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml
0 → 100644
View file @
f80a7aa3
description
:
A Helm chart for Kubernetes
name
:
chart-missing-deps
version
:
0.1.0
cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore
0 → 100644
View file @
f80a7aa3
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml
0 → 100644
View file @
f80a7aa3
description
:
A Helm chart for Kubernetes
name
:
reqsubchart
version
:
0.1.0
cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml
0 → 100644
View file @
f80a7aa3
# Default values for reqsubchart.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
cmd/helm/testdata/testcharts/chart-bad-requirements/requirements.yaml
0 → 100644
View file @
f80a7aa3
dependencies
:
-
name
:
reqsubchart
version
:
0.1.0
repository
:
"
https://example.com/charts"
cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml
0 → 100644
View file @
f80a7aa3
# Default values for reqtest.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
cmd/helm/upgrade_test.go
View file @
f80a7aa3
...
...
@@ -82,6 +82,7 @@ func TestUpgradeCmd(t *testing.T) {
originalDepsPath
:=
filepath
.
Join
(
"testdata/testcharts/reqtest"
)
missingDepsPath
:=
filepath
.
Join
(
"testdata/testcharts/chart-missing-deps"
)
badDepsPath
:=
filepath
.
Join
(
"testdata/testcharts/chart-bad-requirements"
)
var
ch3
*
chart
.
Chart
ch3
,
err
=
chartutil
.
Load
(
originalDepsPath
)
if
err
!=
nil
{
...
...
@@ -143,6 +144,12 @@ func TestUpgradeCmd(t *testing.T) {
resp
:
releaseMock
(
&
releaseOptions
{
name
:
"bonkers-bunny"
,
version
:
1
,
chart
:
ch3
}),
err
:
true
,
},
{
name
:
"upgrade a release with bad dependencies"
,
args
:
[]
string
{
"bonkers-bunny"
,
badDepsPath
},
resp
:
releaseMock
(
&
releaseOptions
{
name
:
"bonkers-bunny"
,
version
:
1
,
chart
:
ch3
}),
err
:
true
,
},
}
cmd
:=
func
(
c
*
fakeReleaseClient
,
out
io
.
Writer
)
*
cobra
.
Command
{
...
...
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