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:
Julio Montes
2018-04-09 12:12:42 -05:00
parent 50fd76eb9a
commit dacc175536

View File

@@ -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
}