github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/tests/integration_tests/availability/run.sh (about)

     1  #!/bin/bash
     2  
     3  set -eu
     4  
     5  CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
     6  source $CUR/../_utils/test_prepare
     7  source $CUR/owner.sh
     8  source $CUR/capture.sh
     9  source $CUR/processor.sh
    10  WORK_DIR=$OUT_DIR/$TEST_NAME
    11  CDC_BINARY=cdc.test
    12  SINK_TYPE=$1
    13  
    14  export DOWN_TIDB_HOST
    15  export DOWN_TIDB_PORT
    16  
    17  function prepare() {
    18  	rm -rf $WORK_DIR && mkdir -p $WORK_DIR
    19  
    20  	start_tidb_cluster --workdir $WORK_DIR
    21  
    22  	cd $WORK_DIR
    23  }
    24  
    25  trap stop_tidb_cluster EXIT
    26  if [ "$SINK_TYPE" == "mysql" ]; then
    27  	prepare $*
    28  	test_owner_ha $*
    29  	test_capture_ha $*
    30  	test_processor_ha $*
    31  fi
    32  check_logs $WORK_DIR
    33  echo "[$(date)] <<<<<< run test case $TEST_NAME success! >>>>>>"