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
cc1eeeb7
Commit
cc1eeeb7
authored
Jan 25, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19959 from mesosphere/jdef_fix_k8s_19954_scheduler_integration_test
Auto commit by PR queue bot
parents
33d1f6c0
0b50f6c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
integration_test.go
contrib/mesos/pkg/scheduler/integration/integration_test.go
+17
-1
No files found.
contrib/mesos/pkg/scheduler/integration/integration_test.go
View file @
cc1eeeb7
...
...
@@ -198,13 +198,23 @@ func (lw *MockPodsListWatch) Pod(name string) *api.Pod {
for
_
,
p
:=
range
lw
.
list
.
Items
{
if
p
.
Name
==
name
{
return
&
p
clone
,
err
:=
api
.
Scheme
.
DeepCopy
(
&
p
)
if
err
!=
nil
{
panic
(
err
.
Error
())
}
return
clone
.
(
*
api
.
Pod
)
}
}
return
nil
}
func
(
lw
*
MockPodsListWatch
)
Add
(
pod
*
api
.
Pod
,
notify
bool
)
{
clone
,
err
:=
api
.
Scheme
.
DeepCopy
(
pod
)
if
err
!=
nil
{
panic
(
err
.
Error
())
}
pod
=
clone
.
(
*
api
.
Pod
)
func
()
{
lw
.
lock
.
Lock
()
defer
lw
.
lock
.
Unlock
()
...
...
@@ -216,6 +226,12 @@ func (lw *MockPodsListWatch) Add(pod *api.Pod, notify bool) {
}
}
func
(
lw
*
MockPodsListWatch
)
Modify
(
pod
*
api
.
Pod
,
notify
bool
)
{
clone
,
err
:=
api
.
Scheme
.
DeepCopy
(
pod
)
if
err
!=
nil
{
panic
(
"failed to clone pod object"
)
}
pod
=
clone
.
(
*
api
.
Pod
)
found
:=
false
func
()
{
lw
.
lock
.
Lock
()
...
...
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