Kubelet: pass the acutal pod for status update

Pod status update should include the ObjectMeta of the pod. This change is
required for #5738 to merge.
This commit is contained in:
Yu-Ju Hong
2015-03-24 16:52:38 -07:00
parent 754cbea1f0
commit b4b0bc75c4
8 changed files with 120 additions and 70 deletions

View File

@@ -47,7 +47,7 @@ func createPodWorkers() (*podWorkers, map[types.UID][]string) {
podWorkers := newPodWorkers(
fakeDockerCache,
func(pod *api.Pod, hasMirrorPod bool, runningPod container.Pod) error {
func(pod *api.Pod, mirrorPod *api.Pod, runningPod container.Pod) error {
func() {
lock.Lock()
defer lock.Unlock()
@@ -84,7 +84,7 @@ func TestUpdatePod(t *testing.T) {
numPods := 20
for i := 0; i < numPods; i++ {
for j := i; j < numPods; j++ {
podWorkers.UpdatePod(newPod(string(j), string(i)), false, func() {})
podWorkers.UpdatePod(newPod(string(j), string(i)), nil, func() {})
}
}
drainWorkers(podWorkers, numPods)
@@ -117,7 +117,7 @@ func TestForgetNonExistingPodWorkers(t *testing.T) {
numPods := 20
for i := 0; i < numPods; i++ {
podWorkers.UpdatePod(newPod(string(i), "name"), false, func() {})
podWorkers.UpdatePod(newPod(string(i), "name"), nil, func() {})
}
drainWorkers(podWorkers, numPods)