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>
diff --git a/extras/hs-test/infra/container.go b/extras/hs-test/infra/container.go
index d71761b..5093398 100644
--- a/extras/hs-test/infra/container.go
+++ b/extras/hs-test/infra/container.go
@@ -463,7 +463,14 @@
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 {