Skip to content

Commit

Permalink
Merge pull request #198 from simondeziel/vm-time-sync-uneeded
Browse files Browse the repository at this point in the history
tests/container-copy: stop trying to wait for host/VM time to be sync'ed
  • Loading branch information
tomponline authored Jun 17, 2024
2 parents fb44ec4 + fa018fe commit 3f62ad4
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/container-copy
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ loopdev="$(losetup --show --find "${loopimg}")"
# Begin Test.
set -x

echo "==> Wait for the host time to be synchronized with NTP"
for _ in $(seq 6); do
[ "$(timedatectl show --property=NTPSynchronized --value)" = "yes" ] && break
sleep 10
done

echo "==> Launch a VM which will be the target of the copy"
lxc launch "${IMAGE}" target --vm
waitInstanceBooted target
Expand All @@ -32,12 +26,6 @@ echo "==> Setup LXD on the target VM"
lxc exec target -- snap install lxd --channel "${LXD_SNAP_CHANNEL}"
lxc exec target -- lxd init --auto --network-address "[::]" --network-port "8443"

echo "==> Wait for the target VM time to be synchronized with NTP"
for _ in $(seq 6); do
[ "$(lxc exec target -- timedatectl show --property=NTPSynchronized --value)" = "yes" ] && break
sleep 10
done

echo "==> Add the target VM as a remote LXD"
token="$(lxc exec target -- lxc config trust add --name host --quiet)"
lxc remote add target "${token}" --accept-certificate
Expand Down

0 comments on commit 3f62ad4

Please sign in to comment.