mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Create docker.Container obj with Name. Integration test is using fake_docker_client
to create and start a fake container. When StartContainer, it pass a name as docker ID for testing purpose, but leave Name uninitialized. This PR fixes such issue. Fixed #4472.
This commit is contained in:
parent
9f768b521d
commit
c843adbd8f
@ -118,6 +118,7 @@ func (f *FakeDockerClient) StartContainer(id string, hostConfig *docker.HostConf
|
||||
f.called = append(f.called, "start")
|
||||
f.Container = &docker.Container{
|
||||
ID: id,
|
||||
Name: id, // For testing purpose, we set name to id
|
||||
Config: &docker.Config{Image: "testimage"},
|
||||
HostConfig: hostConfig,
|
||||
State: docker.State{Running: true},
|
||||
|
Loading…
Reference in New Issue
Block a user