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
225d3a8a
Commit
225d3a8a
authored
Jun 23, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(engine): add test case for deep release passing
parent
e00f774a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
release_server.go
cmd/tiller/release_server.go
+0
-2
engine_test.go
pkg/engine/engine_test.go
+7
-1
No files found.
cmd/tiller/release_server.go
View file @
225d3a8a
...
...
@@ -238,7 +238,6 @@ func (s *releaseServer) InstallRelease(c ctx.Context, req *services.InstallRelea
// Render the templates
// TODO: Fix based on whether chart has `engine: SOMETHING` set.
//vals, err := chartutil.CoalesceValues(req.Chart, req.Values, overrides)
vals
,
err
:=
chartutil
.
CoalesceValues
(
req
.
Chart
,
req
.
Values
,
nil
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -248,7 +247,6 @@ func (s *releaseServer) InstallRelease(c ctx.Context, req *services.InstallRelea
renderer
:=
s
.
engine
(
req
.
Chart
)
files
,
err
:=
renderer
.
Render
(
req
.
Chart
,
overrides
)
//files, err := renderer.Render(req.Chart, vals)
if
err
!=
nil
{
return
nil
,
err
}
...
...
pkg/engine/engine_test.go
View file @
225d3a8a
...
...
@@ -215,11 +215,13 @@ func TestRenderNestedValues(t *testing.T) {
innerpath
:=
"charts/inner/templates/inner.tpl"
outerpath
:=
"templates/outer.tpl"
deepestpath
:=
"charts/inner/charts/deepest/templates/deepest.tpl"
checkrelease
:=
"charts/inner/charts/deepest/templates/release.tpl"
deepest
:=
&
chart
.
Chart
{
Metadata
:
&
chart
.
Metadata
{
Name
:
"deepest"
},
Templates
:
[]
*
chart
.
Template
{
{
Name
:
deepestpath
,
Data
:
[]
byte
(
`And this same {{.Values.what}} that smiles {{.Values.global.when}}`
)},
{
Name
:
checkrelease
,
Data
:
[]
byte
(
`Tomorrow will be {{default "happy" .Release.Name }}`
)},
},
Values
:
&
chart
.
Config
{
Raw
:
`what: "milkshake"`
},
}
...
...
@@ -267,7 +269,7 @@ global:
"Values"
:
tmp
,
"Chart"
:
outer
.
Metadata
,
"Release"
:
chartutil
.
Values
{
"Name"
:
"
Robert
"
,
"Name"
:
"
dyin
"
,
},
}
...
...
@@ -289,4 +291,8 @@ global:
if
out
[
deepestpath
]
!=
"And this same flower that smiles to-day"
{
t
.
Errorf
(
"Unexpected deepest: %q"
,
out
[
deepestpath
])
}
if
out
[
checkrelease
]
!=
"Tomorrow will be dyin"
{
t
.
Errorf
(
"Unexpected release: %q"
,
out
[
checkrelease
])
}
}
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