github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/test_invalid_member_add.sh (about) 1 #!/usr/bin/env bash 2 echo "================= raft invalid member add 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 echo "kill_svr" 13 kill_svr.sh 14 rm -rf $TEST_RAFT_INSTANCE_DATA 15 rm $TEST_RAFT_INSTANCE/BP* 16 17 echo "" 18 echo "========= join invalid config member aergo4 =========" 19 pushd $TEST_RAFT_INSTANCE/config 20 do_sed.sh BP11004.toml aergo4 aergoxxx = 21 popd 22 23 TEST_SKIP_GENESIS=0 make_node.sh 24 RUN_TEST_SCRIPT set_system_admin.sh 25 26 add_member.sh aergo4 27 if [ $? -ne 0 ];then 28 echo "Adding of invalid config member must succeed" 29 exit 100 30 fi 31 32 sleep 40 33 existProcess 10004 34 if [ "$?" = "1" ]; then 35 echo "error! process must be killed." 36 exit 100 37 fi 38 39 pushd $TEST_RAFT_INSTANCE/config 40 do_sed.sh BP11004.toml aergoxxx aergo4 = 41 popd 42 43 echo "" 44 echo "========= rm aergo4 =========" 45 rm_member.sh aergo4 46 rm BP11004* 47 checkSync 10001 10003 20 48 49 echo "" 50 echo "========= check if reorg occured =======" 51 checkReorg