diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2019-07-02 19:11:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-02 19:11:24 +0200 |
| commit | 2fce9974b6ad197682189d4978d77d122cb0ca3f (patch) | |
| tree | 77c96aad57e4ca2cfe2bf68e60212f2eee62c657 /tests | |
| parent | 2ee34a1d24a6bd5f0415946ab40ab24da21f9019 (diff) | |
| parent | 26c6e5f758b86f85dd9f9f46e484ed5fcab2147f (diff) | |
Merge pull request #147 from eraserhd/autossh
port autossh service from nixos
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autossh.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/autossh.nix b/tests/autossh.nix new file mode 100644 index 0000000..d1aacd0 --- /dev/null +++ b/tests/autossh.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + services.autossh.sessions = [ { + name = "foo"; + user = "jfelice"; + extraArguments = "-i /some/key -T -N bar.eraserhead.net"; + } ]; + + test = '' + plist=${config.out}/Library/LaunchDaemons/org.nixos.autossh-foo.plist + test -f $plist + grep '<string>exec /nix/store/.*/bin/autossh ' $plist + grep '<string>exec.*-i /some/key ' $plist + tr -d '\n\t ' <$plist |grep '<key>KeepAlive</key><true */>' + ''; +} |
