github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/dmctl_basic/check_list/resume_relay.sh (about)

     1  #!/bin/bash
     2  
     3  : '
     4  TODO
     5  ยป resume-relay -s 172.17.0.6:8262 -s 172.17.0.2:8262
     6  {
     7      "op": "InvalidRelayOp",
     8      "result": true,
     9      "msg": "",
    10      "workers": [
    11          {
    12              "op": "ResumeRelay",
    13              "result": true,
    14              "worker": "172.17.0.2:8262",
    15              "msg": ""
    16          },
    17          {
    18              "op": "ResumeRelay",
    19              "result": true,
    20              "worker": "172.17.0.6:8262",
    21              "msg": ""
    22          }
    23      ]
    24  }
    25  '
    26  
    27  function resume_relay_wrong_arg() {
    28  	run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
    29  		"resume-relay wrong_arg" \
    30  		"resume-relay <-s source ...> \[flags\]" 1
    31  }
    32  
    33  function resume_relay_wihout_worker() {
    34  	run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
    35  		"resume-relay" \
    36  		"must specify at least one source" 1
    37  }
    38  
    39  function resume_relay_while_master_down() {
    40  	run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
    41  		"resume-relay -s $SOURCE_ID1 -s $SOURCE_ID2" \
    42  		"can not resume relay unit:" 1
    43  }
    44  
    45  function resume_relay_success() {
    46  	run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
    47  		"resume-relay -s $SOURCE_ID1 -s $SOURCE_ID2" \
    48  		"\"result\": true" 3 \
    49  		"\"source\": \"$SOURCE_ID1\"" 1 \
    50  		"\"source\": \"$SOURCE_ID2\"" 1
    51  }