only list valid secrets/users/machines

Git often leaves empty directories behind
This commit is contained in:
Jörg Thalheim
2023-09-07 12:48:34 +02:00
parent ae3283a762
commit c3ccf68007
4 changed files with 28 additions and 8 deletions

View File

@@ -153,6 +153,9 @@ def test_secrets(
cli.run(["secrets", "machines", "add", "machine1", age_keys[0].pubkey])
cli.run(["secrets", "machines", "add-secret", "machine1", "key"])
capsys.readouterr()
cli.run(["secrets", "machines", "list"])
assert capsys.readouterr().out == "machine1\n"
with use_key(age_keys[0].privkey, monkeypatch):
capsys.readouterr()