Skip to content

Commit

Permalink
espanso: fix test
Browse files Browse the repository at this point in the history
Signed-off-by: phanirithvij <[email protected]>
  • Loading branch information
phanirithvij committed Oct 16, 2024
1 parent bc49053 commit ef0586d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/modules/services/espanso/basic-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:

{
services.espanso = {
Expand Down Expand Up @@ -42,8 +42,16 @@

nmt.script = ''
serviceFile=home-files/.config/systemd/user/espanso.service
expectedServiceFile=${./basic-configuration.service}
assertFileExists "$serviceFile"
assertFileContent "$serviceFile" ${./basic-configuration.service}
assertFileRegex "$serviceFile" 'ExecStart=.*/bin/espanso daemon'
if [[ $(uname) == "Linux" ]]; then
grep -v "espanso daemon" "$(_abs $serviceFile)" > espanso-service.actual
grep -v "espanso daemon" "$expectedServiceFile" > espanso-service.expected
assertFileContent "$(realpath espanso-service.actual)" espanso-service.expected
else
assertFileContent "$serviceFile" "$expectedServiceFile"
fi
configFile=home-files/.config/espanso/config/default.yml
assertFileExists "$configFile"
Expand Down

0 comments on commit ef0586d

Please sign in to comment.