secret cli: add get command that returns the key of users/machines

This commit is contained in:
Jörg Thalheim
2023-08-30 11:30:57 +02:00
parent 54d855a6cd
commit af38408a3e
3 changed files with 35 additions and 7 deletions

View File

@@ -36,8 +36,13 @@ def _test_identities(
age_keys[0].privkey,
]
)
capsys.readouterr() # empty the buffer
capsys.readouterr() # empty the buffer
cli.run(["secrets", what, "get", "foo"])
out = capsys.readouterr() # empty the buffer
assert age_keys[0].pubkey in out.out
capsys.readouterr() # empty the buffer
cli.run(["secrets", what, "list"])
out = capsys.readouterr() # empty the buffer
assert "foo" in out.out