mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixosTests.pcsclite: init
Add a small test to verify that the pcscd socket unit works, and that a client can connect (which requires auto-starting pcscd.service).
This commit is contained in:
parent
b90a941bd4
commit
feab16815e
2 changed files with 30 additions and 0 deletions
|
|
@ -1227,6 +1227,7 @@ in
|
|||
pass-secret-service = runTest ./pass-secret-service.nix;
|
||||
password-option-override-ordering = runTest ./password-option-override-ordering.nix;
|
||||
patroni = handleTestOn [ "x86_64-linux" ] ./patroni.nix { };
|
||||
pcsclite = runTest ./pcsclite.nix;
|
||||
pdns-recursor = runTest ./pdns-recursor.nix;
|
||||
peerflix = runTest ./peerflix.nix;
|
||||
peering-manager = runTest ./web-apps/peering-manager.nix;
|
||||
|
|
|
|||
29
nixos/tests/pcsclite.nix
Normal file
29
nixos/tests/pcsclite.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
name = "pcsclite";
|
||||
meta.maintainers = [ lib.maintainers.bjornfor ];
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.pcsc-tools
|
||||
];
|
||||
services.pcscd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("pcscd.socket")
|
||||
|
||||
with subtest("client can connect"):
|
||||
machine.succeed("pcsc_scan -r")
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue