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
df30c4ab
Commit
df30c4ab
authored
Oct 10, 2016
by
Matt Butcher
Committed by
GitHub
Oct 10, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1315 from technosophos/fix/1313-sort-manifestsw
fix(tiller): correct sort manifests by type
parents
5ed4dd4d
a85c37f2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
hooks.go
cmd/tiller/hooks.go
+1
-1
hooks_test.go
cmd/tiller/hooks_test.go
+24
-0
No files found.
cmd/tiller/hooks.go
View file @
df30c4ab
...
...
@@ -165,5 +165,5 @@ func sortManifests(files map[string]string, apis versionSet, sort SortOrder) ([]
}
hs
=
append
(
hs
,
h
)
}
return
hs
,
generic
,
nil
return
hs
,
sortByKind
(
generic
,
sort
)
,
nil
}
cmd/tiller/hooks_test.go
View file @
df30c4ab
...
...
@@ -19,6 +19,8 @@ package main
import
(
"testing"
"github.com/ghodss/yaml"
"k8s.io/helm/pkg/proto/hapi/release"
)
...
...
@@ -156,6 +158,28 @@ metadata:
}
}
// Verify the sort order
sorted
:=
make
([]
manifest
,
len
(
data
))
for
i
,
s
:=
range
data
{
var
sh
simpleHead
err
:=
yaml
.
Unmarshal
([]
byte
(
s
.
manifest
),
&
sh
)
if
err
!=
nil
{
// This is expected for manifests that are corrupt or empty.
t
.
Log
(
err
)
}
sorted
[
i
]
=
manifest
{
content
:
s
.
manifest
,
name
:
s
.
name
,
head
:
&
sh
,
}
}
sorted
=
sortByKind
(
sorted
,
InstallOrder
)
for
i
,
m
:=
range
generic
{
if
m
.
content
!=
sorted
[
i
]
.
content
{
t
.
Errorf
(
"Expected %q, got %q"
,
m
.
content
,
sorted
[
i
]
.
content
)
}
}
}
func
TestVersionSet
(
t
*
testing
.
T
)
{
...
...
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