tests/systemd-user-config: Handle default settings
The test now gracefully handles changes in the systemd module
This commit is contained in:
parent
d2a525cfd6
commit
46b6ea9ccd
|
@ -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'"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue