Skip to content

Commit 4b8522a

Browse files
author
Sergio Schvezov
authored
tests: add LXD spread test (#2983)
Test that LXD builds fine and installs. Instrumenting the installation comes later. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
1 parent eb6763f commit 4b8522a

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

spread.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ suites:
415415
systems:
416416
- ubuntu-18.04-64
417417
manual: true
418-
summary: externals snaps
418+
summary: external snaps
419419
prepare: |
420420
sudo apt-get install git
421421
sudo apt-mark auto git

tests/spread/snaps/lxd/task.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
summary: Build lxd using LXD and on host
2+
kill-timeout: 90m
3+
4+
environment:
5+
SNAP_REPO: https://github.com/lxc/lxd-pkg-snap
6+
PROVIDER_OPTION/lxd: "--use-lxd"
7+
PROVIDER_OPTION/destructive: "--destructive-mode"
8+
9+
prepare: |
10+
git clone "$SNAP_REPO" repo
11+
12+
restore: |
13+
unset SNAPCRAFT_BUILD_ENVIRONMENT
14+
15+
pushd repo
16+
snapcraft clean "$PROVIDER_OPTION"
17+
popd
18+
19+
rm -rf repo
20+
21+
execute: |
22+
unset SNAPCRAFT_BUILD_ENVIRONMENT
23+
24+
cd repo
25+
snapcraft "$PROVIDER_OPTION"
26+
27+
# TODO LXD is a special snow flake. Enabling this needs removal on restore.
28+
# snap install --dangerous lxd_*.snap

0 commit comments

Comments
 (0)