1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

nixos/test/vault: fix assertion logic

"vault status" now returns exit code 2 when the
vault is still unsealed.
This commit is contained in:
Jonathan Ringer 2021-06-29 10:10:12 -07:00 committed by Jonathan Ringer
parent 08ab2d3c2a
commit cd687af9f4

View file

@ -19,6 +19,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
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")
# vault now returns exit code 2 for sealed vaults
machine.fail("vault status")
machine.succeed("vault status || test $? -eq 2")
'';
})