github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/dmctl_advance/check_list/handle_error.sh (about) 1 #!/bin/bash 2 3 function handle_error_wrong_arg() { 4 run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ 5 "handle-error" \ 6 "handle-error <task-name | task-file> \[-s source ...\] \[-b binlog-pos\] <skip\/replace\/revert> \[replace-sql1;replace-sql2;\] \[flags\]" 1 7 } 8 9 function handle_error_invalid_binlogpos() { 10 binlog_pos="mysql-bin:shoud-bin-digital" 11 run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ 12 "handle-error test-task --binlog-pos $binlog_pos skip" \ 13 "\[.*\], Message: invalid --binlog-pos $binlog_pos in handle-error operation: the pos should be digital" 1 14 } 15 16 function handle_error_invalid_sqls() { 17 sqls="alter table tb add column a int; alter table tb2 b int;" 18 run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ 19 "handle-error test-task replace $sqls" \ 20 "invalid sql" 1 21 } 22 23 function handle_error_invalid_op() { 24 run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ 25 "handle-error test-task wrong_operation" \ 26 "invalid operation 'wrong_operation'" 1 27 }