Browse Source

Fix SSH handling in sanity tests

If file ~/.ssh/known_hosts doesn't exist (as when new VM is used)
ssh-keyscan -R will fail

Change-Id: I989fd3ef3ea541e6e63da6059ca0f6ff0a55bcaa
changes/04/612204/2
Kaspars Skels 3 years ago
parent
commit
419fd6b2d6
  1. 2
      tools/tests.sh

2
tools/tests.sh

@ -89,7 +89,9 @@ function wait_for_ssh_port {
wait_for_ssh_port $FLOATING_IP
# SSH into the VM and check it can reach the outside world
touch ~/.ssh/known_hosts
ssh-keygen -R "$FLOATING_IP"
ssh-keyscan "$FLOATING_IP" >> ~/.ssh/known_hosts
ssh -i ${OSH_VM_KEY_STACK} cirros@${FLOATING_IP} ping -q -c 1 -W 2 ${OSH_EXT_GATEWAY}

Loading…
Cancel
Save