Skip to content

Commit

Permalink
tests: set ServerAliveInterval in case ssh server stops answering
Browse files Browse the repository at this point in the history
  • Loading branch information
valentindavid authored and Meulengracht committed Apr 15, 2024
1 parent 235a247 commit acc605c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/lib/nested.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MON_PORT=${MON_PORT:-8888}
IMAGE_FILE="${WORK_DIR}/ubuntu-core-24.img"

execute_remote(){
sshpass -p ubuntu ssh -p "$SSH_PORT" -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@localhost "$*"
sshpass -p ubuntu ssh -p "$SSH_PORT" -o ServerAliveInterval=60 -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@localhost "$*"
}

wait_for_ssh(){
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/prepare-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SSH_PORT=${SSH_PORT:-8022}
MON_PORT=${MON_PORT:-8888}

execute_remote(){
sshpass -p ubuntu ssh -p "$SSH_PORT" -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@localhost "$*"
sshpass -p ubuntu ssh -p "$SSH_PORT" -o ServerAliveInterval=60 -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@localhost "$*"
}

wait_for_ssh(){
Expand Down

0 comments on commit acc605c

Please sign in to comment.