nixos/tests: disable logrotate service by default in tests
This commit is contained in:
@@ -218,6 +218,8 @@ in
|
|||||||
|
|
||||||
services.displayManager.logToJournal = true;
|
services.displayManager.logToJournal = true;
|
||||||
|
|
||||||
|
services.logrotate.enable = lib.mkDefault false;
|
||||||
|
|
||||||
# Make sure we use the Guest Agent from the QEMU package for testing
|
# Make sure we use the Guest Agent from the QEMU package for testing
|
||||||
# to reduce the closure size required for the tests.
|
# to reduce the closure size required for the tests.
|
||||||
services.qemuGuest.package = pkgs.qemu_test.ga;
|
services.qemuGuest.package = pkgs.qemu_test.ga;
|
||||||
|
|||||||
@@ -16,17 +16,24 @@ import ./make-test-python.nix ({ pkgs, ... }: rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
defaultMachine = { ... }: { };
|
defaultMachine = { ... }: {
|
||||||
|
services.logrotate.enable = true;
|
||||||
|
};
|
||||||
failingMachine = { ... }: {
|
failingMachine = { ... }: {
|
||||||
services.logrotate.configFile = pkgs.writeText "logrotate.conf" ''
|
services.logrotate = {
|
||||||
|
enable = true;
|
||||||
|
configFile = pkgs.writeText "logrotate.conf" ''
|
||||||
# self-written config file
|
# self-written config file
|
||||||
su notarealuser notagroupeither
|
su notarealuser notagroupeither
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
machine = { config, ... }: {
|
machine = { config, ... }: {
|
||||||
imports = [ importTest ];
|
imports = [ importTest ];
|
||||||
|
|
||||||
services.logrotate.settings = {
|
services.logrotate = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
# remove default frequency header and add another
|
# remove default frequency header and add another
|
||||||
header = {
|
header = {
|
||||||
frequency = null;
|
frequency = null;
|
||||||
@@ -66,6 +73,7 @@ import ./make-test-python.nix ({ pkgs, ... }: rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
|
|||||||
Reference in New Issue
Block a user