github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/test_invalid_member_init.sh (about)

     1  #!/usr/bin/env bash
     2  echo "================= raft invalid member init test ===================="
     3  
     4  BP_NAME=""
     5  
     6  #rm BP*.toml
     7  #./aergoconf-gen.sh 10001 tmpl.toml 5
     8  #clean.sh
     9  #./inittest.sh
    10  source test_common.sh
    11  
    12  
    13  echo "kill_svr"
    14  kill_svr.sh
    15  rm -rf $TEST_RAFT_INSTANCE_DATA
    16  rm $TEST_RAFT_INSTANCE/BP*
    17  
    18  echo ""
    19  echo "========= invalid initial member node3  ========="
    20  pushd $TEST_RAFT_INSTANCE/config
    21  do_sed.sh BP11001.toml aergo1 aergo1_xxx =
    22  
    23  TEST_SKIP_GENESIS=0 TEST_NOWAIT_PEER=1 make_node.sh
    24  RUN_TEST_SCRIPT set_system_admin.sh
    25  
    26  sleep 10
    27  
    28  existProcess 10001
    29  if [ "$?" = "1" ]; then
    30  	echo "failed to verify invalid cluster"
    31  	exit 100
    32  fi
    33  
    34  echo "node aergo1 is crashed because of invalid config"
    35  
    36  checkSync 10002 10003 60 result
    37  
    38  pushd $TEST_RAFT_INSTANCE/config
    39  do_sed.sh BP11001.toml aergo1_xxx aergo1 =
    40  popd
    41  
    42  
    43  echo ""
    44  echo "========= check if reorg occured ======="
    45  checkReorg