forked from canonical/netplan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspread.yaml
53 lines (48 loc) · 1.58 KB
/
spread.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
project: netplan
backends:
lxd:
systems: [ubuntu-22.04]
qemu:
systems:
- ubuntu-22.04-64:
username: ubuntu
password: ubuntu
suites:
tests/spread/:
summary: integration tests
path: /home/tests
prepare: |
# FIXME: remove after legacy symlink in 107 gets dropped (see meson.build)
# This is needed as the git netplan puts a symlink to /lib/netplan/generate
# but the package has the real generate there
rm -f /lib/netplan/generate
# FIXME: having the debian packging available would allow "apt
# build-dep -y ./" would make this easier :)
apt update -qq
apt install -y build-essential meson pkg-config libyaml-dev \
libglib2.0-dev uuid-dev python3 libsystemd-dev pandoc python3-pytest \
python3-coverage libcmocka-dev python3-rich
# install, a bit ugly but this is a container (did I mention the packaging?)
meson setup build --prefix=/usr
meson compile -C build
# FIXME: enable, this crashes right now with:
# https://paste.ubuntu.com/p/qRnJvjyddN/
#meson test -C build --verbose
meson install -C build --destdir=/
# set some defaults
cat > /etc/netplan/0-snapd-defaults.yaml <<'EOF'
network:
version: 2
bridges:
br54:
dhcp4: true
EOF
chmod 0600 /etc/netplan/0-snapd-defaults.yaml
echo "Precondition check, the basics work"
netplan get bridges.br54.dhcp4 | MATCH true
# keep original config around
tar cvf "$SPREAD_PATH"/etc-netplan.tar.gz /etc/netplan/
restore-each: |
# restore original netplan dir
rm -rf /etc/netplan/*
(cd / && tar xvf "$SPREAD_PATH"/etc-netplan.tar.gz)