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
423d44d5
Commit
423d44d5
authored
May 20, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #751 from technosophos/fix/helm-list-deleted
fix(tiller): stop returning deleted releases for list
parents
1ca02d6e
1412a88c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
memory.go
pkg/storage/memory.go
+5
-5
memory_test.go
pkg/storage/memory_test.go
+12
-1
No files found.
pkg/storage/memory.go
View file @
423d44d5
...
...
@@ -70,15 +70,15 @@ func (m *Memory) Delete(name string) (*release.Release, error) {
return
rel
,
nil
}
// List returns all releases.
// List returns all releases
whose status is not Status_DELETED
.
func
(
m
*
Memory
)
List
()
([]
*
release
.
Release
,
error
)
{
m
.
RLock
()
defer
m
.
RUnlock
()
buf
:=
make
([]
*
release
.
Release
,
len
(
m
.
releases
))
i
:=
0
buf
:=
[]
*
release
.
Release
{}
for
_
,
v
:=
range
m
.
releases
{
buf
[
i
]
=
v
i
++
if
v
.
Info
.
Status
.
Code
!=
release
.
Status_DELETED
{
buf
=
append
(
buf
,
v
)
}
}
return
buf
,
nil
}
...
...
pkg/storage/memory_test.go
View file @
423d44d5
...
...
@@ -72,7 +72,18 @@ func TestList(t *testing.T) {
rels
:=
[]
string
{
"a"
,
"b"
,
"c"
}
for
_
,
k
:=
range
rels
{
ms
.
Create
(
&
release
.
Release
{
Name
:
k
})
ms
.
Create
(
&
release
.
Release
{
Name
:
k
,
Info
:
&
release
.
Info
{
Status
:
&
release
.
Status
{
Code
:
release
.
Status_UNKNOWN
},
},
})
ms
.
Create
(
&
release
.
Release
{
Name
:
"deleted-should-not-show-up"
,
Info
:
&
release
.
Info
{
Status
:
&
release
.
Status
{
Code
:
release
.
Status_DELETED
},
},
})
}
l
,
err
:=
ms
.
List
()
...
...
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