Skip to content

Commit

Permalink
tests/lxd-vm: prepare test for running on multiple systems
Browse files Browse the repository at this point in the history
Prepare the test to run on multiple systems and mention why Ubuntu 16.04, 18.04,
and 22.04 are not currently working.

Signed-off-by: Maciej Borzecki <[email protected]>
  • Loading branch information
bboozzoo committed Mar 29, 2024
1 parent 77fbb21 commit cdf9533
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
5 changes: 4 additions & 1 deletion tests/lxd-vm/spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ project: spread
backends:
lxd-vm:
systems:
- ubuntu-20.04
# list systems which are known to work as VMs, both 16.04 and 18.04 do
# not work at all, lxd-agent does not start, 22.04 requires a fix for
# SSH from https://github.com/snapcore/spread/pull/184 or a similar PR
- ubuntu-20.04

path: /home/test

Expand Down
18 changes: 8 additions & 10 deletions tests/lxd-vm/task.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
summary: Test the lxd backend.

prepare: |
if [ ! -f .spread-reuse.yaml ]; then
touch /run/spread-reuse.yaml
ln -s /run/spread-reuse.yaml .spread-reuse.yaml
fi
execute: |
spread -vv -reuse -resend &> task.out
grep 'lxd-vm:ubuntu-20.04:checks/main' task.out
grep '^WORKS$' task.out
# we'll run out of space on GCP systems so run VM tests one by one
for t in $(spread -list); do
spread -vv "$t" &> task.out
MATCH '^WORKS$' < task.out
# delete all VM images (there's just one test per system so this is
# fine), note lxd 4.x does not support filtering by image type
lxc image delete $(lxc image list -f csv -c 'ft' |grep VIRTUAL | cut -f1 -d,)
done
debug: |
cat task.out || true

0 comments on commit cdf9533

Please sign in to comment.