diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2021-06-29 10:10:12 -0700 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-06-30 22:50:01 -0700 |
commit | cd687af9f4825f82cb7c77456d6ffdf826a44d31 (patch) | |
tree | 8464e2f53b18a404c4d6b9d4c9be2c45fa713c8f | |
parent | 08ab2d3c2abd67b48d3f81f6d77e2fc240b0b4eb (diff) |
nixos/test/vault: fix assertion logic
"vault status" now returns exit code 2 when the vault is still unsealed.
-rw-r--r-- | nixos/tests/vault.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/vault.nix b/nixos/tests/vault.nix index 59bccbe259590..c3b28b62695ad 100644 --- a/nixos/tests/vault.nix +++ b/nixos/tests/vault.nix @@ -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") ''; }) |