github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/test/integration_tests/external_resource/run.sh (about)

     1  #!/bin/bash
     2  
     3  set -eu
     4  
     5  WORK_DIR=$OUT_DIR/$TEST_NAME
     6  CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
     7  
     8  CONFIG="$DOCKER_COMPOSE_DIR/1minio.yaml"
     9  CONFIG=$(adjust_config $OUT_DIR $TEST_NAME $CONFIG)
    10  echo "using adjusted configs to deploy cluster: $CONFIG"
    11  
    12  function run() {
    13  	start_engine_cluster $CONFIG
    14  	echo -e "\nstart to run external storage integration tests...\n"
    15  
    16  	export ENGINE_S3_ACCESS_KEY=engine
    17  	export ENGINE_S3_SECRET_KEY=engineSecret
    18  	export ENGINE_S3_ENDPOINT="http://127.0.0.1:9000/"
    19  
    20  	CGO_ENABLED=0 go test -timeout 300s -cover -count 1 -v -run ^TestIntegrationS3 github.com/pingcap/tiflow/engine/pkg/externalresource/internal/bucket
    21  
    22  	CGO_ENABLED=0 go test -timeout 600s -cover -count 1 -v -run ^TestIntegrationBroker github.com/pingcap/tiflow/engine/pkg/externalresource/broker
    23  
    24  	echo -e "\ncheck external storage integration tests result..."
    25  	if cat $OUT_DIR/engine_it.log | grep "SKIP:"; then
    26  		echo -e "some tests are skipped, please check env and engine_it.log\n"
    27  		exit 1
    28  	fi
    29  }
    30  
    31  trap "stop_engine_cluster $WORK_DIR $CONFIG" EXIT
    32  run $*
    33  echo "[$(date)] <<<<<< run test case $TEST_NAME success! >>>>>>"