hs-test: fix docker log output when logs are empty
- removed "==> /dev/null <==" and "tail: cannot open..." lines when docker logs are empty Type: test Change-Id: Ia51f7aa41d2c6c04c0adcb82142abfd45fbe2728 Signed-off-by: Adrian Villin <avillin@cisco.com>
This commit is contained in:

committed by
Dave Wallace

parent
b753554e25
commit
09b19fe8a3
@@ -463,7 +463,14 @@ func (c *Container) log(maxLines int) (string, error) {
|
||||
stdout := stdoutBuf.String()
|
||||
stderr := stderrBuf.String()
|
||||
|
||||
return stdout + " " + stderr, err
|
||||
if strings.Contains(stdout, "==> /dev/null <==") {
|
||||
stdout = ""
|
||||
}
|
||||
if strings.Contains(stderr, "tail: cannot open") {
|
||||
stderr = ""
|
||||
}
|
||||
|
||||
return stdout + stderr, err
|
||||
}
|
||||
|
||||
func (c *Container) stop() error {
|
||||
|
Reference in New Issue
Block a user