swap: don't activate random encrypted swap files

This requires more code and is not implemented just now.
This commit is contained in:
Jörg Thalheim authored and mergify[bot] committed 2023-11-25 15:47:29 +00:00
1 parent 2d7d77878c
commit 3cb78c93e6
3 files changed
+14 -13

No files matched your search

+4 -9
View File
@@ -6,17 +6,12 @@ diskoLib.testLib.makeDiskoTest {
name = "swap";
disko-config = ../example/swap.nix;
extraTestScript = ''
import json
machine.succeed("mountpoint /");
machine.succeed("swapon --show >&2");
machine.succeed("""
lsblk --json |
jq -e '.blockdevices[] |
select(.name == "vda") |
.children[] |
select(.name == "vda3") |
.children[0].mountpoints[0] == "[SWAP]"
'
""");
out = json.loads(machine.succeed("lsblk --json /dev/vda"))
mnt_point = out["blockdevices"][0]["children"][1]["children"][0]["mountpoints"][0]
assert mnt_point == "[SWAP]"
'';
extraSystemConfig = {
environment.systemPackages = [ pkgs.jq ];