diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index de39a9a9c..169b6105d 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -169,9 +169,9 @@ fn_setstatus(){ echo "Required status: ${requiredstatus}" counter=0 echo "Current status: ${currentstatus}" - while [ "${requiredstatus}" != "${currentstatus}" ]; do - counter=$((counter+1)) - fn_currentstatus_tmux + while [ "${requiredstatus}" != "${currentstatus}" ]; do + counter=$((counter+1)) + fn_currentstatus_tmux echo -ne "New status: ${currentstatus}\\r" if [ "${requiredstatus}" == "ONLINE" ]; then @@ -379,7 +379,7 @@ fn_setstatus (command_restart.sh) fn_test_result_pass -echo "4.1 - update" +echo "4.1 - update - Offline" echo "=================================" echo "Description:" echo "check for updates." @@ -389,6 +389,16 @@ fn_setstatus (command_update.sh) fn_test_result_pass +echo "4.2 - update - Online" +echo "=================================" +echo "Description:" +echo "check for updates." +echo "Command: ./jc2server update" +requiredstatus="ONLINE" +fn_setstatus +(command_update.sh) +fn_test_result_pass + echo "" echo "4.2 - update - change buildid" echo "=================================" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 882c12351..aaa823d6c 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -168,19 +168,19 @@ fn_setstatus(){ else (command_stop.sh > /dev/null 2>&1) fi - if [ "${counter}" -gt "5" ]; then - currentstatus="FAIL" - echo "Current status: ${currentstatus}" - echo "" - echo "Unable to start or stop server." - exit 1 - fi - done - echo -ne "New status: ${currentstatus}\\r" - echo -e "\n" - echo "Test starting:" - echo "" - sleep 0.5 + if [ "${counter}" -gt "5" ]; then + currentstatus="FAIL" + echo "Current status: ${currentstatus}" + echo "" + echo "Unable to start or stop server." + exit 1 + fi + done + echo -ne "New status: ${currentstatus}\\r" + echo -e "\n" + echo "Test starting:" + echo "" + sleep 0.5 } # End of every test will expect the result to either pass or fail @@ -368,11 +368,28 @@ fn_setstatus (command_restart.sh) fn_test_result_pass -echo "4.1 - update" +echo "4.1 - update - Offline" +echo "=================================" +echo "Description:" +echo "check for updates." +echo "Command: ./jc2server update" +requiredstatus="OFFLINE" +fn_setstatus +(command_update.sh) +fn_test_result_pass + +echo "4.2 - update - Online" echo "=================================" echo "Description:" echo "check for updates." echo "Command: ./ts3server update" +requiredstatus="ONLINE" +fn_setstatus +(command_update.sh) +fn_test_result_pass +fn_setstatus +(command_update.sh) +fn_test_result_pass requiredstatus="OFFLINE" fn_setstatus (command_update.sh)