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
5ed1dc25
Commit
5ed1dc25
authored
Mar 23, 2016
by
Dave Cunningham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write some new unit tests for expandybird
parent
69f31b9e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
expander.go
cmd/expandybird/expander/expander.go
+6
-1
expander_test.go
cmd/expandybird/expander/expander_test.go
+0
-0
No files found.
cmd/expandybird/expander/expander.go
View file @
5ed1dc25
...
...
@@ -58,6 +58,11 @@ func (e *expander) ExpandChart(request *common.ExpansionRequest) (*common.Expans
chartInv
:=
request
.
ChartInvocation
chartFile
:=
request
.
Chart
.
Chartfile
chartMembers
:=
request
.
Chart
.
Members
if
chartInv
.
Type
!=
chartFile
.
Name
{
return
nil
,
fmt
.
Errorf
(
"Request chart invocation does not match provided chart"
)
}
schemaName
:=
chartInv
.
Type
+
".schema"
if
chartFile
.
Expander
==
nil
{
...
...
@@ -89,7 +94,7 @@ func (e *expander) ExpandChart(request *common.ExpansionRequest) (*common.Expans
message
:=
fmt
.
Sprintf
(
"The entrypoint in the chart.yaml cannot be found: %s"
,
chartFile
.
Expander
.
Entrypoint
)
return
nil
,
fmt
.
Errorf
(
"%s: %s"
,
chartInv
.
Name
,
message
)
}
if
schemaIndex
==
-
1
{
if
chartFile
.
Schema
!=
""
&&
schemaIndex
==
-
1
{
message
:=
fmt
.
Sprintf
(
"The schema in the chart.yaml cannot be found: %s"
,
chartFile
.
Schema
)
return
nil
,
fmt
.
Errorf
(
"%s: %s"
,
chartInv
.
Name
,
message
)
}
...
...
cmd/expandybird/expander/expander_test.go
View file @
5ed1dc25
This diff is collapsed.
Click to expand it.
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