-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests,slices: correct a couple of slices, add tests
- Loading branch information
1 parent
fad5cdc
commit 025479b
Showing
6 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
summary: Integration tests for iproute2 | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices bash_bins passwd_config base-files_base grep_bins iproute2_bins)" | ||
# iproute2 needs dev mounted | ||
mkdir "${rootfs}"/dev | ||
mount --rbind /dev "${rootfs}"/dev | ||
cp test.sh "${rootfs}/" | ||
chroot "${rootfs}/" /test.sh | ||
umount -l "${rootfs}"/dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# smoketest ip commands | ||
ip --help | grep "Usage:" | ||
|
||
# test some basic commands and against loopback that | ||
# we can kinda expect is there | ||
ip link | grep "LOOPBACK,UP" | ||
ip addr | grep "inet 127.0.0.1" | ||
ip route | grep -E "default via [0-9\.]+" | ||
|
||
# iproute carries many binaries | ||
# so maybe extend as needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
summary: Integration tests for netplan.io | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices bash_bins coreutils_bins passwd_config base-files_base grep_bins netplan.io_bins)" | ||
# netplan needs proc and dev mounted | ||
mkdir "${rootfs}"/proc | ||
mount -t proc /proc "${rootfs}"/proc | ||
mkdir "${rootfs}"/dev | ||
mount --rbind /dev "${rootfs}"/dev | ||
cp test.sh "${rootfs}/" | ||
chroot "${rootfs}/" /test.sh | ||
umount -l "${rootfs}"/dev | ||
umount "${rootfs}"/proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# smoketest a couple of netplan commands | ||
netplan --help | grep "Network configuration in YAML" | ||
netplan info | grep "features" | ||
|
||
# 'netplan generate' needs udevadm to work | ||
# 'netplan apply' needs udevadm to work | ||
# 'netplan status' does not properly work inside chroot |