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
5b7e841f
Commit
5b7e841f
authored
Sep 01, 2016
by
fibonacci1729
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(tiller): delete redundant testing of storage in pkg/environment
parent
b74251f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
75 deletions
+0
-75
environment_test.go
cmd/tiller/environment/environment_test.go
+0
-75
No files found.
cmd/tiller/environment/environment_test.go
View file @
5b7e841f
...
...
@@ -23,9 +23,6 @@ import (
"k8s.io/helm/pkg/chartutil"
"k8s.io/helm/pkg/proto/hapi/chart"
"k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/storage"
"k8s.io/helm/pkg/storage/driver"
unversionedclient
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/client/unversioned/testclient"
)
...
...
@@ -38,52 +35,6 @@ func (e *mockEngine) Render(chrt *chart.Chart, v chartutil.Values) (map[string]s
return
e
.
out
,
nil
}
type
mockReleaseStorage
struct
{
rel
*
release
.
Release
}
var
_
driver
.
Driver
=
(
*
mockReleaseStorage
)(
nil
)
func
(
r
*
mockReleaseStorage
)
Create
(
v
*
release
.
Release
)
error
{
r
.
rel
=
v
return
nil
}
func
(
r
*
mockReleaseStorage
)
Name
()
string
{
return
"mockReleaseStorage"
}
func
(
r
*
mockReleaseStorage
)
Get
(
k
string
)
(
*
release
.
Release
,
error
)
{
return
r
.
rel
,
nil
}
func
(
r
*
mockReleaseStorage
)
Update
(
v
*
release
.
Release
)
error
{
r
.
rel
=
v
return
nil
}
func
(
r
*
mockReleaseStorage
)
Delete
(
k
string
)
(
*
release
.
Release
,
error
)
{
return
r
.
rel
,
nil
}
func
(
r
*
mockReleaseStorage
)
List
(
func
(
*
release
.
Release
)
bool
)
([]
*
release
.
Release
,
error
)
{
return
[]
*
release
.
Release
{},
nil
}
func
(
r
*
mockReleaseStorage
)
Query
(
labels
map
[
string
]
string
)
([]
*
release
.
Release
,
error
)
{
return
[]
*
release
.
Release
{},
nil
}
func
(
r
*
mockReleaseStorage
)
History
(
n
string
)
([]
*
release
.
Release
,
error
)
{
res
:=
[]
*
release
.
Release
{}
rel
,
err
:=
r
.
Get
(
n
)
if
err
!=
nil
{
return
res
,
err
}
res
=
append
(
res
,
rel
)
return
res
,
nil
}
type
mockKubeClient
struct
{
}
...
...
@@ -126,32 +77,6 @@ func TestEngine(t *testing.T) {
}
}
func
TestReleaseStorage
(
t
*
testing
.
T
)
{
rs
:=
&
mockReleaseStorage
{}
env
:=
New
()
env
.
Releases
=
storage
.
Init
(
rs
)
release
:=
&
release
.
Release
{
Name
:
"mariner"
}
if
err
:=
env
.
Releases
.
Create
(
release
);
err
!=
nil
{
t
.
Fatalf
(
"failed to store release: %s"
,
err
)
}
if
err
:=
env
.
Releases
.
Update
(
release
);
err
!=
nil
{
t
.
Fatalf
(
"failed to update release: %s"
,
err
)
}
if
v
,
err
:=
env
.
Releases
.
Get
(
"albatross"
);
err
!=
nil
{
t
.
Errorf
(
"Error fetching release: %s"
,
err
)
}
else
if
v
.
Name
!=
"mariner"
{
t
.
Errorf
(
"Expected mariner, got %q"
,
v
.
Name
)
}
if
_
,
err
:=
env
.
Releases
.
Delete
(
"albatross"
);
err
!=
nil
{
t
.
Fatalf
(
"failed to delete release: %s"
,
err
)
}
}
func
TestKubeClient
(
t
*
testing
.
T
)
{
kc
:=
&
mockKubeClient
{}
env
:=
New
()
...
...
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