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}"
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 "================================="

45
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)

Loading…
Cancel
Save