mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00: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:
@@ -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")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user