Adding/updating kubelet/kuberuntime tests

This commit is contained in:
marosset
2020-04-17 00:56:36 +00:00
parent 03479e4d12
commit 90367729a3
3 changed files with 76 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ import (
"sync"
"time"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/flowcontrol"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
@@ -300,6 +300,13 @@ func (f *FakeRuntime) PullImage(image kubecontainer.ImageSpec, pullSecrets []v1.
defer f.Unlock()
f.CalledFunctions = append(f.CalledFunctions, "PullImage")
if f.Err == nil {
i := kubecontainer.Image{
ID: image.Image,
Spec: image,
}
f.ImageList = append(f.ImageList, i)
}
return image.Image, f.Err
}