You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
740 B
Nix

{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
, pkgs ? (import <nixpkgs> { })
,
}:
let
makeTest' = args:
makeTest args {
inherit pkgs;
inherit (pkgs) system;
};
in
{
vault-agent = makeTest' (import ./vault-agent-test.nix);
systemd-vaultd = makeTest' (import ./systemd-vaultd-test.nix);
unittests = makeTest' {
name = "unittests";
nodes.server = {
imports = [
../modules/systemd-vaultd.nix
];
};
testScript = ''
start_all()
server.succeed("machinectl shell .host ${pkgs.callPackage ./unittests.nix {}} >&2")
# machinectl does not passthru exit codes, so we have to check manually
server.succeed("[[ -f /tmp/success ]]")
'';
};
}