test: move part of TEST-02-CRYPTSETUP setup to static files
Since we create an encrypted partition for this test, let's create a separate image here.
This commit is contained in:
parent
fe85f2bb9c
commit
5964e39a69
|
@ -42,25 +42,12 @@ test_setup() {
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
mask_supporting_services
|
mask_supporting_services
|
||||||
|
|
||||||
# setup the testsuite service
|
|
||||||
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
|
|
||||||
[Unit]
|
|
||||||
Description=Testsuite service
|
|
||||||
After=multi-user.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/bin/sh -x -c 'systemctl --state=failed --no-legend --no-pager > /failed ; echo OK > /testok'
|
|
||||||
Type=oneshot
|
|
||||||
EOF
|
|
||||||
|
|
||||||
setup_testsuite
|
|
||||||
|
|
||||||
install_dmevent
|
install_dmevent
|
||||||
generate_module_dependencies
|
generate_module_dependencies
|
||||||
cat >$initdir/etc/crypttab <<EOF
|
cat >$initdir/etc/crypttab <<EOF
|
||||||
$DM_NAME UUID=$ID_FS_UUID /etc/varkey
|
$DM_NAME UUID=$ID_FS_UUID /etc/varkey
|
||||||
EOF
|
EOF
|
||||||
echo -n test > $initdir/etc/varkey
|
echo -n test >$initdir/etc/varkey
|
||||||
cat $initdir/etc/crypttab | ddebug
|
cat $initdir/etc/crypttab | ddebug
|
||||||
|
|
||||||
cat >>$initdir/etc/fstab <<EOF
|
cat >>$initdir/etc/fstab <<EOF
|
||||||
|
@ -86,4 +73,4 @@ test_setup_cleanup() {
|
||||||
_test_setup_cleanup
|
_test_setup_cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
do_test "$@"
|
do_test "$@" 02
|
||||||
|
|
7
test/units/testsuite-02.service
Normal file
7
test/units/testsuite-02.service
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[Unit]
|
||||||
|
Description=TEST-02-CRYPTSETUP
|
||||||
|
After=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=sh -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; echo OK > /testok'
|
||||||
|
Type=oneshot
|
Loading…
Reference in a new issue