Browse Source

added test update - online

pull/914/head
Daniel Gibbs 9 years ago
parent
commit
67dd3430a1
  1. 18
      tests/tests_jc2server.sh
  2. 45
      tests/tests_ts3server.sh

18
tests/tests_jc2server.sh

@ -169,9 +169,9 @@ fn_setstatus(){
echo "Required status: ${requiredstatus}" echo "Required status: ${requiredstatus}"
counter=0 counter=0
echo "Current status: ${currentstatus}" echo "Current status: ${currentstatus}"
while [ "${requiredstatus}" != "${currentstatus}" ]; do while [ "${requiredstatus}" != "${currentstatus}" ]; do
counter=$((counter+1)) counter=$((counter+1))
fn_currentstatus_tmux fn_currentstatus_tmux
echo -ne "New status: ${currentstatus}\\r" echo -ne "New status: ${currentstatus}\\r"
if [ "${requiredstatus}" == "ONLINE" ]; then if [ "${requiredstatus}" == "ONLINE" ]; then
@ -379,7 +379,7 @@ fn_setstatus
(command_restart.sh) (command_restart.sh)
fn_test_result_pass fn_test_result_pass
echo "4.1 - update" echo "4.1 - update - Offline"
echo "=================================" echo "================================="
echo "Description:" echo "Description:"
echo "check for updates." echo "check for updates."
@ -389,6 +389,16 @@ fn_setstatus
(command_update.sh) (command_update.sh)
fn_test_result_pass 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 ""
echo "4.2 - update - change buildid" echo "4.2 - update - change buildid"
echo "=================================" echo "================================="

45
tests/tests_ts3server.sh

@ -168,19 +168,19 @@ fn_setstatus(){
else else
(command_stop.sh > /dev/null 2>&1) (command_stop.sh > /dev/null 2>&1)
fi fi
if [ "${counter}" -gt "5" ]; then if [ "${counter}" -gt "5" ]; then
currentstatus="FAIL" currentstatus="FAIL"
echo "Current status: ${currentstatus}" echo "Current status: ${currentstatus}"
echo "" echo ""
echo "Unable to start or stop server." echo "Unable to start or stop server."
exit 1 exit 1
fi fi
done done
echo -ne "New status: ${currentstatus}\\r" echo -ne "New status: ${currentstatus}\\r"
echo -e "\n" echo -e "\n"
echo "Test starting:" echo "Test starting:"
echo "" echo ""
sleep 0.5 sleep 0.5
} }
# End of every test will expect the result to either pass or fail # End of every test will expect the result to either pass or fail
@ -368,11 +368,28 @@ fn_setstatus
(command_restart.sh) (command_restart.sh)
fn_test_result_pass 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 "================================="
echo "Description:" echo "Description:"
echo "check for updates." echo "check for updates."
echo "Command: ./ts3server update" 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" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_update.sh) (command_update.sh)

Loading…
Cancel
Save