From 95b153456a10b995a54319b63531074c6ff06686 Mon Sep 17 00:00:00 2001 From: Aldo Culquicondor Date: Mon, 27 May 2019 10:55:46 -0400 Subject: [PATCH] Add linux container resources to fake runtime service Signed-off-by: Aldo Culquicondor --- .../k8s.io/cri-api/pkg/apis/testing/fake_runtime_service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/cri-api/pkg/apis/testing/fake_runtime_service.go b/staging/src/k8s.io/cri-api/pkg/apis/testing/fake_runtime_service.go index 4d9190a84e5..afcdfa0879e 100644 --- a/staging/src/k8s.io/cri-api/pkg/apis/testing/fake_runtime_service.go +++ b/staging/src/k8s.io/cri-api/pkg/apis/testing/fake_runtime_service.go @@ -43,6 +43,9 @@ type FakeContainer struct { // ContainerStatus contains the runtime information for a container. runtimeapi.ContainerStatus + // LinuxResources contains the resources specific to linux containers. + LinuxResources *runtimeapi.LinuxContainerResources + // the sandbox id of this container SandboxID string } @@ -327,7 +330,8 @@ func (r *FakeRuntimeService) CreateContainer(podSandboxID string, config *runtim Labels: config.Labels, Annotations: config.Annotations, }, - SandboxID: podSandboxID, + SandboxID: podSandboxID, + LinuxResources: config.GetLinux().GetResources(), } return containerID, nil