Compare by string instead of number
This commit is contained in:
parent
56096d05ca
commit
930e0b0b3b
2 changed files with 7 additions and 3 deletions
|
@ -159,7 +159,7 @@ rcon-command () {
|
||||||
RESPONSE=$(read-response "$IN_PIPE")
|
RESPONSE=$(read-response "$IN_PIPE")
|
||||||
|
|
||||||
RESPONSE_REQUEST_ID=$(response-request-id "$RESPONSE")
|
RESPONSE_REQUEST_ID=$(response-request-id "$RESPONSE")
|
||||||
if [ "$RESPONSE_REQUEST_ID" -eq -1 ] || [ "$RESPONSE_REQUEST_ID" -eq 4294967295 ]; then
|
if [[ "$RESPONSE_REQUEST_ID" == "-1" ]] || [[ "$RESPONSE_REQUEST_ID" == "4294967295" ]]; then
|
||||||
log-warning "RCON connection failed: Wrong RCON password" 1>&2
|
log-warning "RCON connection failed: Wrong RCON password" 1>&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -16,10 +16,14 @@ setUp () {
|
||||||
echo "file3" > "$TEST_TMP/server/world/file3.txt"
|
echo "file3" > "$TEST_TMP/server/world/file3.txt"
|
||||||
|
|
||||||
screen -dmS "$SCREEN_TMP" bash
|
screen -dmS "$SCREEN_TMP" bash
|
||||||
sleep 0.1
|
while ! screen -S "$SCREEN_TMP" -Q "select" . &>/dev/null; do
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
screen -S "$SCREEN_TMP" -X stuff "cat > $TEST_TMP/screen-output\n"
|
screen -S "$SCREEN_TMP" -X stuff "cat > $TEST_TMP/screen-output\n"
|
||||||
tmux new-session -d -s "$SCREEN_TMP"
|
tmux new-session -d -s "$SCREEN_TMP"
|
||||||
sleep 0.1
|
while ! tmux has-session -t "$SCREEN_TMP" 2>/dev/null; do
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
tmux send-keys -t "$SCREEN_TMP" "cat > $TEST_TMP/tmux-output" ENTER
|
tmux send-keys -t "$SCREEN_TMP" "cat > $TEST_TMP/tmux-output" ENTER
|
||||||
python test/mock_rcon.py "$RCON_PORT" "$RCON_PASSWORD" > "$TEST_TMP/rcon-output" &
|
python test/mock_rcon.py "$RCON_PORT" "$RCON_PASSWORD" > "$TEST_TMP/rcon-output" &
|
||||||
echo "$!" > "$TEST_TMP/rcon-pid"
|
echo "$!" > "$TEST_TMP/rcon-pid"
|
||||||
|
|
Loading…
Add table
Reference in a new issue