diff --git a/nixos/release.nix b/nixos/release.nix index ac4dd3d78923..d5093a7883e8 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -336,6 +336,7 @@ in rec { tests.taskserver = callTest tests/taskserver.nix {}; tests.tomcat = callTest tests/tomcat.nix {}; tests.udisks2 = callTest tests/udisks2.nix {}; + tests.vault = callTest tests/vault.nix {}; tests.virtualbox = callSubTests tests/virtualbox.nix { system = "x86_64-linux"; }; tests.wordpress = callTest tests/wordpress.nix {}; tests.xfce = callTest tests/xfce.nix {}; diff --git a/nixos/tests/vault.nix b/nixos/tests/vault.nix new file mode 100644 index 000000000000..2c08d06f286b --- /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"'); + ''; +})