github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/tests/integration_tests/_utils/check_logs_contains (about)

     1  #!/bin/bash
     2  WORK_DIR=$1
     3  LOG_SUFFIX=$3
     4  
     5  set -eu
     6  log_name="cdc"$LOG_SUFFIX".log"
     7  if ! grep -Eq "$2" "$WORK_DIR/$log_name"; then
     8  	echo "TEST FAILED: LOGS DOES NOT CONTAIN '$2'"
     9  	echo "____________________________________"
    10  	exit 1
    11  fi