Skip to content

Commit

Permalink
Adjust test case for kapitan refs --reveal to not set VAULT_ADDR en…
Browse files Browse the repository at this point in the history
…vvar

Setting `VAULT_ADDR` for `kapitan refs --reveal` for a VaultKV secret
causes a validation error due to the way we implement support for legacy
envvar style vaultkv configurations in the inventory.
  • Loading branch information
simu committed Oct 17, 2024
1 parent 401b8bc commit 77af251
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ def test_cli_secret_write_vault(self, mock_reveal):

# set stdout as string
stdout = io.StringIO()
with contextlib.redirect_stdout(stdout), set_env(VAULT_ADDR=self.server.vault_url):
# don't set VAULT_ADDR in the environment here, since that would cause a validation error.
with contextlib.redirect_stdout(stdout):
main()
self.assertEqual("revealing: {value}".format(value=test_secret_content), stdout.getvalue())

Expand Down

0 comments on commit 77af251

Please sign in to comment.