nixos/tests/machinectl: Disable tmpfs for /tmp
This commit is contained in:
parent
6d31353099
commit
9bb2a979d4
1 changed files with 11 additions and 0 deletions
|
@ -44,6 +44,14 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||
|
||||
# not needed, but we want to test the nspawn file generation
|
||||
systemd.nspawn.${containerName} = { };
|
||||
|
||||
systemd.services."systemd-nspawn@${containerName}" = {
|
||||
serviceConfig.Environment = [
|
||||
# Disable tmpfs for /tmp
|
||||
"SYSTEMD_NSPAWN_TMPFS_TMP=0"
|
||||
];
|
||||
overrideStrategy = "asDropin";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
@ -95,6 +103,9 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||
machine.succeed("machinectl stop ${containerName}");
|
||||
machine.wait_until_succeeds("test $(systemctl is-active systemd-nspawn@${containerName}) = inactive");
|
||||
|
||||
# Test tmpfs for /tmp
|
||||
machine.fail("mountpoint /tmp");
|
||||
|
||||
# Show to to delete the container
|
||||
machine.succeed("chattr -i ${containerRoot}/var/empty");
|
||||
machine.succeed("rm -rf ${containerRoot}");
|
||||
|
|
Loading…
Reference in a new issue