From 526a862a2d5ddbc56d6c720be1d91b6037ed6332 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 24 Jun 2020 20:06:19 -0700 Subject: [PATCH] tests/int/debug.bats: fixups 1. Remove the check that `log.out` file exists. This check is redundant, since right after it we do `cat log.out` and check its exit code. 2. Show the contents of log.out to stderr, so it case of error we can see what is going on. Signed-off-by: Kir Kolyshkin --- tests/integration/debug.bats | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/integration/debug.bats b/tests/integration/debug.bats index 7c91d306dfc..908dcb46e60 100644 --- a/tests/integration/debug.bats +++ b/tests/integration/debug.bats @@ -31,9 +31,6 @@ function teardown() { # check output does not include debug info [[ "${output}" != *"level=debug"* ]] - # check log.out was generated - [ -e log.out ] - # check expected debug output was sent to log.out run cat log.out [ "$status" -eq 0 ] @@ -50,11 +47,9 @@ function teardown() { # check output does not include debug info [[ "${output}" != *"level=debug"* ]] - # check log.out was generated - [ -e log.out ] - # check expected debug output was sent to log.out run cat log.out + echo "$output" >&2 [ "$status" -eq 0 ] [[ "${output}" == *"level=debug"* ]] [[ "${output}" == *"nsexec container setup"* ]] @@ -69,11 +64,9 @@ function teardown() { # check output does not include debug info [[ "${output}" != *"level=debug"* ]] - # check log.out was generated - [ -e log.out ] - # check expected debug output was sent to log.out run cat log.out + echo "$output" >&2 [ "$status" -eq 0 ] [[ "${output}" == *'"level":"debug"'* ]] [[ "${output}" == *"nsexec container setup"* ]]