nixos/fsck: port test to python
This commit is contained in:
parent
04f0961627
commit
1afa50aef1
1 changed files with 12 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix {
|
||||
import ./make-test-python.nix {
|
||||
name = "fsck";
|
||||
|
||||
machine = { lib, ... }: {
|
||||
|
@ -14,16 +14,18 @@ import ./make-test.nix {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
$machine->waitForUnit('default.target');
|
||||
machine.wait_for_unit("default.target")
|
||||
|
||||
subtest "root fs is fsckd", sub {
|
||||
$machine->succeed('journalctl -b | grep "fsck.ext4.*/dev/vda"');
|
||||
};
|
||||
with subtest("root fs is fsckd"):
|
||||
machine.succeed("journalctl -b | grep 'fsck.ext4.*/dev/vda'")
|
||||
|
||||
subtest "mnt fs is fsckd", sub {
|
||||
$machine->succeed('journalctl -b | grep "fsck.*/dev/vdb.*clean"');
|
||||
$machine->succeed('grep "Requires=systemd-fsck@dev-vdb.service" /run/systemd/generator/mnt.mount');
|
||||
$machine->succeed('grep "After=systemd-fsck@dev-vdb.service" /run/systemd/generator/mnt.mount');
|
||||
};
|
||||
with subtest("mnt fs is fsckd"):
|
||||
machine.succeed("journalctl -b | grep 'fsck.*/dev/vdb.*clean'")
|
||||
machine.succeed(
|
||||
"grep 'Requires=systemd-fsck@dev-vdb.service' /run/systemd/generator/mnt.mount"
|
||||
)
|
||||
machine.succeed(
|
||||
"grep 'After=systemd-fsck@dev-vdb.service' /run/systemd/generator/mnt.mount"
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue