Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5e38d785
Commit
5e38d785
authored
Feb 08, 2018
by
Ashley Gau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make context the first arg in AddInstanceHook/RemoveInstanceHook
parent
4b398a6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mock.go
pkg/cloudprovider/providers/gce/cloud/mock/mock.go
+3
-3
No files found.
pkg/cloudprovider/providers/gce/cloud/mock/mock.go
View file @
5e38d785
...
@@ -35,7 +35,7 @@ import (
...
@@ -35,7 +35,7 @@ import (
)
)
// AddInstanceHook mocks adding a Instance to MockTargetPools
// AddInstanceHook mocks adding a Instance to MockTargetPools
func
AddInstanceHook
(
m
*
cloud
.
MockTargetPools
,
ctx
context
.
Context
,
key
*
meta
.
Key
,
req
*
ga
.
TargetPoolsAddInstanceRequest
)
error
{
func
AddInstanceHook
(
ctx
context
.
Context
,
key
*
meta
.
Key
,
req
*
ga
.
TargetPoolsAddInstanceRequest
,
m
*
cloud
.
MockTargetPools
)
error
{
pool
,
err
:=
m
.
Get
(
ctx
,
key
)
pool
,
err
:=
m
.
Get
(
ctx
,
key
)
if
err
!=
nil
{
if
err
!=
nil
{
return
&
googleapi
.
Error
{
return
&
googleapi
.
Error
{
...
@@ -51,8 +51,8 @@ func AddInstanceHook(m *cloud.MockTargetPools, ctx context.Context, key *meta.Ke
...
@@ -51,8 +51,8 @@ func AddInstanceHook(m *cloud.MockTargetPools, ctx context.Context, key *meta.Ke
return
nil
return
nil
}
}
//
Add
InstanceHook mocks removing a Instance from MockTargetPools
//
Remove
InstanceHook mocks removing a Instance from MockTargetPools
func
RemoveInstanceHook
(
m
*
cloud
.
MockTargetPools
,
ctx
context
.
Context
,
key
*
meta
.
Key
,
req
*
ga
.
TargetPoolsRemoveInstanceRequest
)
error
{
func
RemoveInstanceHook
(
ctx
context
.
Context
,
key
*
meta
.
Key
,
req
*
ga
.
TargetPoolsRemoveInstanceRequest
,
m
*
cloud
.
MockTargetPools
)
error
{
pool
,
err
:=
m
.
Get
(
ctx
,
key
)
pool
,
err
:=
m
.
Get
(
ctx
,
key
)
if
err
!=
nil
{
if
err
!=
nil
{
return
&
googleapi
.
Error
{
return
&
googleapi
.
Error
{
...
...
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