github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/test_new_backup.sh (about) 1 #!/usr/bin/env bash 2 echo "================= raft new cluster with backup 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 rm -rf $TEST_RAFT_INSTANCE_DATA 13 rm BP*.toml 14 15 echo "start new cluster for bakcup" 16 TEST_SKIP_GENESIS=0 make_node.sh 17 sleep 2 18 19 # kill aergo3 20 kill_svr.sh 21 22 # prepare backup data 23 rm -rf $TEST_RAFT_INSTANCE/data/11001 24 cp -rf $TEST_RAFT_INSTANCE/data/11003 $TEST_RAFT_INSTANCE/data/11001 25 26 do_sed.sh "toml" "usebackup=false" "usebackup=true" ":" 27 run_svr.sh 11001 28 29 RUN_TEST_SCRIPT set_system_admin.sh 30 31 date 32 echo "" 33 echo "========= add aergo4 =========" 34 add_member.sh aergo4 35 checkSync 10001 10004 120 result 36 37 38 do_sed.sh "toml" "usebackup=true" "usebackup=false" ":"