tests: fix broken unit file when clightning is disabled
Previously, an incomplete clightning unit was always created because attr `clightning` was always defined in option attrset `systemd.services`.
This commit is contained in:
parent
a51f7b419e
commit
c6d85c6fe3
@ -53,12 +53,6 @@ let
|
|||||||
clboss.path = "${nbPkgs.clboss}/bin/clboss";
|
clboss.path = "${nbPkgs.clboss}/bin/clboss";
|
||||||
};
|
};
|
||||||
in map (plugin: pluginPkgs.${plugin}.path) enabled;
|
in map (plugin: pluginPkgs.${plugin}.path) enabled;
|
||||||
# Torified 'dig' subprocesses of clboss don't respond to SIGTERM and keep
|
|
||||||
# running for a long time when WAN is disabled, which prevents clightning units
|
|
||||||
# from stopping quickly.
|
|
||||||
# Set TimeoutStopSec for faster stopping.
|
|
||||||
systemd.services.clightning.serviceConfig.TimeoutStopSec =
|
|
||||||
mkIf config.services.clightning.plugins.clboss.enable "500ms";
|
|
||||||
|
|
||||||
tests.clightning-rest = cfg.clightning-rest.enable;
|
tests.clightning-rest = cfg.clightning-rest.enable;
|
||||||
|
|
||||||
@ -140,6 +134,13 @@ let
|
|||||||
# Avoid timeout failures on slow CI nodes
|
# Avoid timeout failures on slow CI nodes
|
||||||
systemd.services.postgresql.serviceConfig.TimeoutStartSec = "5min";
|
systemd.services.postgresql.serviceConfig.TimeoutStartSec = "5min";
|
||||||
}
|
}
|
||||||
|
(mkIf config.services.clightning.plugins.clboss.enable {
|
||||||
|
# Torified 'dig' subprocesses of clboss don't respond to SIGTERM and keep
|
||||||
|
# running for a long time when WAN is disabled, which prevents clightning units
|
||||||
|
# from stopping quickly.
|
||||||
|
# Set TimeoutStopSec for faster stopping.
|
||||||
|
systemd.services.clightning.serviceConfig.TimeoutStopSec = "500ms";
|
||||||
|
})
|
||||||
(mkIf config.test.features.clightningPlugins {
|
(mkIf config.test.features.clightningPlugins {
|
||||||
services.clightning.plugins = {
|
services.clightning.plugins = {
|
||||||
clboss.enable = true;
|
clboss.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user