2020-04-24 23:36:52 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }:
|
|
|
|
{
|
|
|
|
name = "vault";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ lnl7 ];
|
|
|
|
};
|
|
|
|
machine = { pkgs, ... }: {
|
|
|
|
environment.systemPackages = [ pkgs.vault ];
|
|
|
|
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
|
|
|
|
services.vault.enable = true;
|
2021-02-05 17:12:51 +00:00
|
|
|
virtualisation.memorySize = 512;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
machine.wait_for_unit("multi-user.target")
|
|
|
|
machine.wait_for_unit("vault.service")
|
|
|
|
machine.wait_for_open_port(8200)
|
|
|
|
machine.succeed("vault operator init")
|
|
|
|
machine.succeed("vault status | grep Sealed | grep true")
|
|
|
|
'';
|
|
|
|
})
|