Skip to content

Commit

Permalink
tests/container: Add test to ensure launching an aliased container im…
Browse files Browse the repository at this point in the history
…age won't launch with vm flag (#294)

- Launching an aliased container image shouldn't launch with the `--vm`
flag; and
- VM's should be launched with `--vm` flag.
  • Loading branch information
tomponline authored Sep 29, 2024
2 parents 59f2a80 + cb825ce commit a8be237
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/container
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ lxc stop c1
lxc start c1
waitInstanceBooted c1

echo "==> Ensure aliased image won't launch with VM flag set"
lxc image alias create containeralias "$(lxc config get c1 volatile.base_image)"
! lxc launch containeralias --vm || false

echo "==> Test exit codes when container disconnects during lxc exec"

# Try disconnecting a container stopping forcefully and gracefully to make sure they differ appropriately.
Expand Down
2 changes: 1 addition & 1 deletion tests/storage-vm
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ for poolDriver in $poolDriverList; do
lxc config set storage.images_volume "${poolName}"/images
lxc publish v1 --alias v1image
lxc delete v1
lxc launch v1image v2 -s "${poolName}"
lxc launch v1image v2 -s "${poolName}" # --vm flag omitted as we are implicitly launching a vm
waitInstanceReady v2
lxc delete -f v2
lxc image delete v1image
Expand Down

0 comments on commit a8be237

Please sign in to comment.