diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2019-03-22 20:49:53 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2019-03-22 20:49:53 +0100 |
| commit | af7cd05699fea0d782e9f23a98d73bd2e696061b (patch) | |
| tree | fa2535b020388d8d3f26ce23eda4ce5c272253c4 /tests/launchd-daemons.nix | |
| parent | b68f77b404af4b2200fd3229a4fd16ef09d0edf9 (diff) | |
launchd: add basic test for daemons/agents
Diffstat (limited to 'tests/launchd-daemons.nix')
| -rw-r--r-- | tests/launchd-daemons.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/launchd-daemons.nix b/tests/launchd-daemons.nix new file mode 100644 index 0000000..59e35aa --- /dev/null +++ b/tests/launchd-daemons.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + launchd.daemons.foo.command = "foo"; + launchd.agents.bar.command = "bar"; + launchd.user.agents.baz.command = "baz"; + + test = '' + echo "checking launchd load in /activate" >&2 + grep "launchctl load .* '/Library/LaunchDaemons/org.nixos.foo.plist" ${config.out}/activate + grep "launchctl load .* '/Library/LaunchAgents/org.nixos.bar.plist" ${config.out}/activate + echo "checking launchd load in /activate-user" >&2 + grep "launchctl load .* ~/Library/LaunchAgents/org.nixos.baz.plist" ${config.out}/activate-user + echo "checking LaunchAgents creation /activate-user" >&2 + grep "mkdir -p ~/Library/LaunchAgents" ${config.out}/activate-user + ''; +} |
