mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-02-03 06:36:39 +00:00
flake: VM: add additional disk with empty ext4 FS
This commit is contained in:
parent
69774ba186
commit
5d01c25f3b
12
flake.nix
12
flake.nix
|
@ -113,10 +113,16 @@
|
||||||
"black --check ${self.outPath} > $out";
|
"black --check ${self.outPath} > $out";
|
||||||
default =
|
default =
|
||||||
pkgs.testers.runNixOSTest {
|
pkgs.testers.runNixOSTest {
|
||||||
imports = [{
|
|
||||||
name = "default";
|
name = "default";
|
||||||
nodes.machine = { lib, pkgs, ... }: {
|
nodes.machine = { lib, pkgs, ... }: {
|
||||||
imports = [{
|
# additional disk of size 1024 MiB with empty ext4 FS
|
||||||
|
virtualisation.emptyDiskImages = [ 1024 ];
|
||||||
|
virtualisation.fileSystems."/volumes/vdb" = {
|
||||||
|
autoFormat = true;
|
||||||
|
device = "/dev/vdb"; # this name is chosen by QEMU, not here
|
||||||
|
fsType = "ext4";
|
||||||
|
noCheck = true;
|
||||||
|
};
|
||||||
boot.consoleLogLevel = lib.mkForce 3;
|
boot.consoleLogLevel = lib.mkForce 3;
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
services.journald.extraConfig = lib.mkForce "";
|
services.journald.extraConfig = lib.mkForce "";
|
||||||
|
@ -135,7 +141,6 @@
|
||||||
environment.variables.TEST_MODE = "true";
|
environment.variables.TEST_MODE = "true";
|
||||||
systemd.tmpfiles.settings.src.${vmtest-src-dir}.L.argument =
|
systemd.tmpfiles.settings.src.${vmtest-src-dir}.L.argument =
|
||||||
self.outPath;
|
self.outPath;
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
testScript = ''
|
testScript = ''
|
||||||
start_all()
|
start_all()
|
||||||
|
@ -144,7 +149,6 @@
|
||||||
machine.copy_from_vm("coverage.xml", ".")
|
machine.copy_from_vm("coverage.xml", ".")
|
||||||
machine.succeed("coverage report >&2")
|
machine.succeed("coverage report >&2")
|
||||||
'';
|
'';
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue