2017-12-04 11:42:30 +00:00
|
|
|
import ./make-test.nix ({ pkgs, ... }:
|
|
|
|
{
|
|
|
|
name = "vault";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ lnl7 ];
|
|
|
|
};
|
2018-07-20 21:56:59 +01:00
|
|
|
machine = { pkgs, ... }: {
|
2017-12-04 11:42:30 +00:00
|
|
|
environment.systemPackages = [ pkgs.vault ];
|
|
|
|
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
|
|
|
|
services.vault.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
startAll;
|
|
|
|
|
|
|
|
$machine->waitForUnit('multi-user.target');
|
|
|
|
$machine->waitForUnit('vault.service');
|
|
|
|
$machine->waitForOpenPort(8200);
|
2018-03-07 23:08:24 +00:00
|
|
|
$machine->succeed('vault operator init');
|
|
|
|
$machine->succeed('vault status | grep Sealed | grep true');
|
2017-12-04 11:42:30 +00:00
|
|
|
'';
|
|
|
|
})
|