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
448bb12c
Commit
448bb12c
authored
Sep 12, 2016
by
Adam Reese
Committed by
GitHub
Sep 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1179 from adamreese/ref/helm-tunnel
ref(helm): simplify tunnel tests
parents
b982afd8
123fb9e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
tunnel.go
cmd/helm/tunnel.go
+1
-1
tunnel_test.go
cmd/helm/tunnel_test.go
+1
-6
No files found.
cmd/helm/tunnel.go
View file @
448bb12c
...
...
@@ -68,5 +68,5 @@ func getFirstRunningPod(client unversioned.PodsNamespacer, namespace string, sel
return
&
p
,
nil
}
}
return
nil
,
fmt
.
Errorf
(
"could not find a ready pod"
)
return
nil
,
fmt
.
Errorf
(
"could not find a ready
tiller
pod"
)
}
cmd/helm/tunnel_test.go
View file @
448bb12c
...
...
@@ -21,7 +21,6 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/client/unversioned/testclient"
"k8s.io/kubernetes/pkg/runtime"
)
func
mockTillerPod
()
api
.
Pod
{
...
...
@@ -75,11 +74,7 @@ func TestGetFirstPod(t *testing.T) {
}
for
_
,
tt
:=
range
tests
{
client
:=
&
testclient
.
Fake
{}
client
.
PrependReactor
(
"list"
,
"pods"
,
func
(
action
testclient
.
Action
)
(
handled
bool
,
ret
runtime
.
Object
,
err
error
)
{
return
true
,
&
api
.
PodList
{
Items
:
tt
.
pods
},
nil
})
client
:=
testclient
.
NewSimpleFake
(
&
api
.
PodList
{
Items
:
tt
.
pods
})
name
,
err
:=
getTillerPodName
(
client
,
api
.
NamespaceDefault
)
if
(
err
!=
nil
)
!=
tt
.
err
{
t
.
Errorf
(
"%q. expected error: %v, got %v"
,
tt
.
name
,
tt
.
err
,
err
)
...
...
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