2019-11-05 16:57:08 +01:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }:
|
2017-12-04 12:42:30 +01:00
|
|
|
{
|
|
|
|
name = "vault";
|
2021-01-10 20:08:30 +01:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2017-12-04 12:42:30 +01:00
|
|
|
maintainers = [ lnl7 ];
|
|
|
|
};
|
2018-07-20 22:56:59 +02:00
|
|
|
machine = { pkgs, ... }: {
|
2017-12-04 12:42:30 +01:00
|
|
|
environment.systemPackages = [ pkgs.vault ];
|
|
|
|
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
|
|
|
|
services.vault.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
2019-11-05 16:57:08 +01:00
|
|
|
start_all()
|
2017-12-04 12:42:30 +01:00
|
|
|
|
2019-11-05 16:57:08 +01:00
|
|
|
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")
|
2017-12-04 12:42:30 +01:00
|
|
|
'';
|
|
|
|
})
|