Add linux container resources to fake runtime service

Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
Aldo Culquicondor 2019-05-27 10:55:46 -04:00
parent 914f80d671
commit 95b153456a

View File

@ -43,6 +43,9 @@ type FakeContainer struct {
// ContainerStatus contains the runtime information for a container. // ContainerStatus contains the runtime information for a container.
runtimeapi.ContainerStatus runtimeapi.ContainerStatus
// LinuxResources contains the resources specific to linux containers.
LinuxResources *runtimeapi.LinuxContainerResources
// the sandbox id of this container // the sandbox id of this container
SandboxID string SandboxID string
} }
@ -328,6 +331,7 @@ func (r *FakeRuntimeService) CreateContainer(podSandboxID string, config *runtim
Annotations: config.Annotations, Annotations: config.Annotations,
}, },
SandboxID: podSandboxID, SandboxID: podSandboxID,
LinuxResources: config.GetLinux().GetResources(),
} }
return containerID, nil return containerID, nil