mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
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
|
||||
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
|
||||
generate_module_dependencies
|
||||
cat >$initdir/etc/crypttab <<EOF
|
||||
$DM_NAME UUID=$ID_FS_UUID /etc/varkey
|
||||
EOF
|
||||
echo -n test > $initdir/etc/varkey
|
||||
echo -n test >$initdir/etc/varkey
|
||||
cat $initdir/etc/crypttab | ddebug
|
||||
|
||||
cat >>$initdir/etc/fstab <<EOF
|
||||
@ -86,4 +73,4 @@ 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 New Issue
Block a user