diff options
author | Dan Streetman <ddstreet@canonical.com> | 2019-07-12 11:47:26 -0400 |
---|---|---|
committer | Dan Streetman <ddstreet@canonical.com> | 2019-07-16 18:05:15 -0400 |
commit | ec4cab49c95d03d23cad9741685f3837a8ccaab4 (patch) | |
tree | 315c884c2c3e9e09af252b54297e2dca2d1a26cd /test/TEST-14-MACHINE-ID | |
parent | 26408c7d5f39ac5b7afb3902eb340917ae821c88 (diff) | |
download | systemd-ec4cab49c95d03d23cad9741685f3837a8ccaab4.tar.gz |
test: add create_empty_image_rootdir() to simplify testcase setup
Almost all tests were manually mounting/unmounting $TESTDIR/root
from the loopback image; this moves all that into test-functions
so the test setup functions are simplier.
Also add test_setup_cleanup() function, to cleanup what is mounted
by create_empty_image_rootdir()
Diffstat (limited to 'test/TEST-14-MACHINE-ID')
-rwxr-xr-x | test/TEST-14-MACHINE-ID/test.sh | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/TEST-14-MACHINE-ID/test.sh b/test/TEST-14-MACHINE-ID/test.sh index c22fc7c3c0..81e76f381f 100755 --- a/test/TEST-14-MACHINE-ID/test.sh +++ b/test/TEST-14-MACHINE-ID/test.sh @@ -6,9 +6,7 @@ TEST_NO_NSPAWN=1 . $TEST_BASE_DIR/test-functions test_setup() { - create_empty_image - mkdir -p $TESTDIR/root - mount ${LOOPDEV}p1 $TESTDIR/root + create_empty_image_rootdir # Create what will eventually be our root filesystem onto an overlay ( @@ -81,9 +79,6 @@ chmod +x $initdir/test-machine-id-setup.sh ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service - - ddebug "umount $TESTDIR/root" - umount $TESTDIR/root } do_test "$@" |