Skip to content

Commit

Permalink
tests: Add file for general VM tests
Browse files Browse the repository at this point in the history
Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed Sep 9, 2024
1 parent a366532 commit d2fbe4f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -eux

# Install LXD
install_lxd

# Configure LXD
lxd init --auto

IMAGE="${TEST_IMG:-ubuntu-minimal-daily:24.04}"

# Launch test instance
lxc launch "${IMAGE}" vm1 --vm

echo "==> Try cleanly stopping a VM"
waitInstanceReady vm1
lxc restart vm1
waitInstanceBooted vm1

# shellcheck disable=SC2034
FAIL=0

0 comments on commit d2fbe4f

Please sign in to comment.