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
765da276
Commit
765da276
authored
Oct 18, 2016
by
Matt Butcher
Committed by
GitHub
Oct 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1389 from technosophos/fix/1387-show-failed
fix(helm): show failed releases by default
parents
d7e56133
51240d52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
list.go
cmd/helm/list.go
+4
-3
list_test.go
cmd/helm/list_test.go
+10
-1
No files found.
cmd/helm/list.go
View file @
765da276
...
...
@@ -33,8 +33,9 @@ import (
var
listHelp
=
`
This command lists all of the releases.
By default, it lists only releases that are deployed. Flags like '--delete' and
'--all' will alter this behavior. Such flags can be combined: '--deleted --failed'.
By default, it lists only releases that are deployed or failed. Flags like
'--delete' and '--all' will alter this behavior. Such flags can be combined:
'--deleted --failed'.
By default, items are sorted alphabetically. Use the '-d' flag to sort by
release date.
...
...
@@ -186,7 +187,7 @@ func (l *listCmd) statusCodes() []release.Status_Code {
// Default case.
if
len
(
status
)
==
0
{
status
=
append
(
status
,
release
.
Status_DEPLOYED
)
status
=
append
(
status
,
release
.
Status_DEPLOYED
,
release
.
Status_FAILED
)
}
return
status
}
...
...
cmd/helm/list_test.go
View file @
765da276
...
...
@@ -47,6 +47,15 @@ func TestListCmd(t *testing.T) {
},
expected
:
"NAME
\t
REVISION
\t
UPDATED
\t
STATUS
\t
CHART
\n
atlas
\t
1
\t
(.*)
\t
DEPLOYED
\t
foo-0.1.0-beta.1
\n
"
,
},
{
name
:
"list, one deployed, one failed"
,
args
:
[]
string
{
"-q"
},
resp
:
[]
*
release
.
Release
{
releaseMock
(
&
releaseOptions
{
name
:
"thomas-guide"
,
statusCode
:
release
.
Status_FAILED
}),
releaseMock
(
&
releaseOptions
{
name
:
"atlas-guide"
,
statusCode
:
release
.
Status_DEPLOYED
}),
},
expected
:
"thomas-guide
\n
atlas-guide"
,
},
{
name
:
"with a release, multiple flags"
,
args
:
[]
string
{
"--deleted"
,
"--deployed"
,
"--failed"
,
"-q"
},
...
...
@@ -83,7 +92,7 @@ func TestListCmd(t *testing.T) {
}
re
:=
regexp
.
MustCompile
(
tt
.
expected
)
if
!
re
.
Match
(
buf
.
Bytes
())
{
t
.
Errorf
(
"%q. expected
%q, got
%q"
,
tt
.
name
,
tt
.
expected
,
buf
.
String
())
t
.
Errorf
(
"%q. expected
\n
%q
\n
got
\n
%q"
,
tt
.
name
,
tt
.
expected
,
buf
.
String
())
}
buf
.
Reset
()
}
...
...
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