mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixosTests.early-mount-options: init
This commit is contained in:
parent
b25259e021
commit
8f94053a21
2 changed files with 20 additions and 0 deletions
19
nixos/tests/early-mount-options.nix
Normal file
19
nixos/tests/early-mount-options.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Test for https://github.com/NixOS/nixpkgs/pull/193469
|
||||
import ./make-test-python.nix {
|
||||
name = "early-mount-options";
|
||||
|
||||
nodes.machine = {
|
||||
virtualisation.fileSystems."/var" = {
|
||||
options = [ "bind" "nosuid" "nodev" "noexec" ];
|
||||
device = "/var";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
var_mount_info = machine.succeed("findmnt /var -n -o OPTIONS")
|
||||
options = var_mount_info.strip().split(",")
|
||||
assert "nosuid" in options and "nodev" in options and "noexec" in options
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue