From 2c4db38b34a993acb383322a20e969d7e2db3508 Mon Sep 17 00:00:00 2001 From: usuletw022 Date: Tue, 26 Mar 2024 10:34:51 +0000 Subject: [PATCH] debug: ignoring exit code 1 output for failed test execution to see docker-compose logs after failure --- e2e_tests/run-e2e-tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/e2e_tests/run-e2e-tests.sh b/e2e_tests/run-e2e-tests.sh index 307ffbd..8b12e0b 100755 --- a/e2e_tests/run-e2e-tests.sh +++ b/e2e_tests/run-e2e-tests.sh @@ -74,9 +74,13 @@ check_health_endpoint() { run_tests() { echo "Running test command..." cd "$TEST_DIR" -# go test --tags=e2e -v ./... -count=1 + # Run your command and redirect stderr to /dev/null + go test --tags=e2e -v ./... -count=1 2>/dev/null + # Check the exit code of the command + if [ $? -ne 0 ]; then + echo "Error: Process completed with exit code 1 ignored." + fi # TEST_RESULT=$? - mosquitto_sub -p 1884 -t 'everest_external/nodered/1/state/state_string' docker-compose logs cd "$CSMS_DIR" docker-compose logs