diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-12-04 12:42:30 +0100 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-12-04 12:59:52 +0100 |
commit | 6a20b88cec1cb56213c382c0f3d8ee337d3c72a0 (patch) | |
tree | 4e83250c4e7bf1b813266e91aa592a302861b0f7 /nixos/tests/vault.nix | |
parent | 8c3b96e58c0d256d37acaee19e5419521760b1e7 (diff) |
vault: add nixos test
Diffstat (limited to 'nixos/tests/vault.nix')
-rw-r--r-- | nixos/tests/vault.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/tests/vault.nix b/nixos/tests/vault.nix new file mode 100644 index 0000000000000..2c08d06f286bd --- /dev/null +++ b/nixos/tests/vault.nix @@ -0,0 +1,23 @@ +import ./make-test.nix ({ pkgs, ... }: +{ + name = "vault"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ lnl7 ]; + }; + machine = { config, pkgs, ... }: { + 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); + $machine->succeed('vault init'); + $machine->succeed('vault status | grep "Sealed: true"'); + ''; +}) |