tests/systemd-user-config: Handle default settings

The test now gracefully handles changes in the systemd module
This commit is contained in:
nicoo 2024-06-16 17:42:45 +00:00
parent d2a525cfd6
commit 46b6ea9ccd

View file

@ -13,13 +13,9 @@
nmt.script = ''
userConf=home-files/.config/systemd/user.conf
assertFileExists $userConf
assertFileContent $userConf ${
pkgs.writeText "expected" ''
[Manager]
DefaultCPUAccounting=true
DefaultEnvironment=PATH='/bin:/sbin:/some where' TEST='abc'
LogLevel=debug
''
}
[ "$(head -n1 "$TESTED/$userConf")" == "[Manager]" ] || exit 1
assertFileContains $userConf DefaultCPUAccounting=true
assertFileContains $userConf LogLevel=debug
assertFileRegex $userConf "^DefaultEnvironment=.*PATH='/bin:/sbin:/some where' .*TEST='abc'"
'';
}