Merge pull request #6653 from yifan-gu/fix_pid_test
kubelet/fake_docker_client: Use self's PID instead of 42 in testing.
This commit is contained in:
@@ -18,6 +18,7 @@ package dockertools
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -180,7 +181,7 @@ func (f *FakeDockerClient) StartContainer(id string, hostConfig *docker.HostConf
|
|||||||
HostConfig: hostConfig,
|
HostConfig: hostConfig,
|
||||||
State: docker.State{
|
State: docker.State{
|
||||||
Running: true,
|
Running: true,
|
||||||
Pid: 42,
|
Pid: os.Getpid(),
|
||||||
},
|
},
|
||||||
NetworkSettings: &docker.NetworkSettings{IPAddress: "1.2.3.4"},
|
NetworkSettings: &docker.NetworkSettings{IPAddress: "1.2.3.4"},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user