File tree 6 files changed +70
-7
lines changed
6 files changed +70
-7
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,23 @@ essential:
4
4
- netplan-generator_copyright
5
5
6
6
slices :
7
- data :
7
+ bins :
8
8
essential :
9
9
- libc6_libs
10
10
- libglib2.0-0t64_libs
11
11
- libnetplan1_libs
12
12
- systemd_bins
13
13
contents :
14
- /usr/lib/netplan/PLACEHOLDER :
15
- /usr/lib/systemd/system-generators/netplan :
16
14
/usr/libexec/netplan/generate :
15
+ /usr/lib/systemd/system-generators/netplan :
16
+
17
+ # the generator needs the folder and thus carry
18
+ # a placeholder file, it will be removed and a
19
+ # symlink to /usr/libexec/netplan/generate will
20
+ # be created in this folder
21
+ placeholder :
22
+ contents :
23
+ /usr/lib/netplan/PLACEHOLDER :
17
24
18
25
copyright :
19
26
contents :
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ slices:
11
11
- libglib2.0-0t64_libs
12
12
- libnetplan1_libs
13
13
- libsystemd0_libs
14
- - netplan-generator_data
15
- - netplan.io_cli
14
+ - netplan-generator_bins
15
+ - netplan.io_scripts
16
16
- python3-dbus_data
17
17
- python3-netifaces_data
18
18
- python3-netplan_data
@@ -22,12 +22,12 @@ slices:
22
22
contents :
23
23
/usr/sbin/netplan :
24
24
25
- cli :
25
+ scripts :
26
26
contents :
27
27
/usr/share/netplan/netplan.script :
28
28
/usr/share/netplan/netplan_cli/** :
29
29
30
- extras :
30
+ dbus-service :
31
31
contents :
32
32
/usr/libexec/netplan/netplan-dbus :
33
33
/usr/share/dbus-1/system-services/io.netplan.Netplan.service :
Original file line number Diff line number Diff line change
1
+ summary : Integration tests for iproute2
2
+
3
+ execute : |
4
+ # Chisel a minimum number of slices to give us a runnable system that we can
5
+ # test in.
6
+ rootfs="$(install-slices bash_bins passwd_config base-files_base grep_bins iproute2_bins)"
7
+
8
+ # iproute2 needs dev mounted
9
+ mkdir "${rootfs}"/dev
10
+ mount --rbind /dev "${rootfs}"/dev
11
+
12
+ cp test.sh "${rootfs}/"
13
+ chroot "${rootfs}/" /test.sh
14
+
15
+ umount -l "${rootfs}"/dev
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # smoketest ip commands
4
+ ip --help | grep " Usage:"
5
+
6
+ # test some basic commands and against loopback that
7
+ # we can kinda expect is there
8
+ ip link | grep " LOOPBACK,UP"
9
+ ip addr | grep " inet 127.0.0.1"
10
+ ip route | grep -E " default via [0-9\.]+"
11
+
12
+ # iproute carries many binaries
13
+ # so maybe extend as needed
Original file line number Diff line number Diff line change
1
+ summary : Integration tests for netplan.io
2
+
3
+ execute : |
4
+ # Chisel a minimum number of slices to give us a runnable system that we can
5
+ # test in.
6
+ rootfs="$(install-slices bash_bins coreutils_bins passwd_config base-files_base grep_bins netplan.io_bins)"
7
+
8
+ # netplan needs proc and dev mounted
9
+ mkdir "${rootfs}"/proc
10
+ mount -t proc /proc "${rootfs}"/proc
11
+
12
+ mkdir "${rootfs}"/dev
13
+ mount --rbind /dev "${rootfs}"/dev
14
+
15
+ cp test.sh "${rootfs}/"
16
+ chroot "${rootfs}/" /test.sh
17
+
18
+ umount -l "${rootfs}"/dev
19
+ umount "${rootfs}"/proc
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # smoketest a couple of netplan commands
4
+ netplan --help | grep " Network configuration in YAML"
5
+ netplan info | grep " features"
6
+
7
+ # 'netplan generate' needs udevadm to work
8
+ # 'netplan apply' needs udevadm to work
9
+ # 'netplan status' does not properly work inside chroot
You can’t perform that action at this time.
0 commit comments