mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
kubelet/fake_docker_client: Use self's PID instead of 42 in testing.
This is safer to use self's PID than some arbitrary PID (say 42), since the kubelet will set the oom_score_adj for real.
This commit is contained in:
parent
3ee42b4643
commit
12b382ce76
@ -18,6 +18,7 @@ package dockertools
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"sort"
|
||||
"sync"
|
||||
@ -180,7 +181,7 @@ func (f *FakeDockerClient) StartContainer(id string, hostConfig *docker.HostConf
|
||||
HostConfig: hostConfig,
|
||||
State: docker.State{
|
||||
Running: true,
|
||||
Pid: 42,
|
||||
Pid: os.Getpid(),
|
||||
},
|
||||
NetworkSettings: &docker.NetworkSettings{IPAddress: "1.2.3.4"},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user