mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
tests/ssh-agent: add test coverage
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
85a5287116
commit
cec4c1be7e
3 changed files with 29 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=@openssh@/bin/ssh-agent -D -a %t/ssh-agent
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=SSH authentication agent
|
||||||
|
Documentation=man:ssh-agent(1)
|
||||||
15
tests/modules/services/ssh-agent/basic-service.nix
Normal file
15
tests/modules/services/ssh-agent/basic-service.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
services.ssh-agent = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileContent \
|
||||||
|
home-files/.config/systemd/user/ssh-agent.service \
|
||||||
|
${./basic-service-expected.service}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
5
tests/modules/services/ssh-agent/default.nix
Normal file
5
tests/modules/services/ssh-agent/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||||
|
ssh-agent-basic-service = ./basic-service.nix;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue