mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 08:28:34 +00:00
virtcontainers: mockcontainer: return a valid process
in order to make log-parser happy, mockcontainer must return always a valid process with a fake PID, since log-parser checks that PID value in the logs and it must be different to zero Depends-on: github.com/kata-containers/tests#226 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
@@ -30,6 +30,10 @@ func (c *Container) Pod() vc.VCPod {
|
||||
|
||||
// Process implements the VCContainer function of the same name.
|
||||
func (c *Container) Process() vc.Process {
|
||||
// always return a mockprocess with a non-zero Pid
|
||||
if c.MockProcess.Pid == 0 {
|
||||
c.MockProcess.Pid = 1000
|
||||
}
|
||||
return c.MockProcess
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user