actual implement secret rename function

This commit is contained in:
Jörg Thalheim
2023-09-03 11:02:48 +02:00
parent 7684061606
commit 949b72bd0b
2 changed files with 12 additions and 6 deletions

View File

@@ -129,9 +129,9 @@ def test_secrets(
with pytest.raises(ClanError): # does not exist yet
cli.run(["secrets", "get", "nonexisting"])
cli.run(["secrets", "set", "key"])
cli.run(["secrets", "set", "initialkey"])
capsys.readouterr()
cli.run(["secrets", "get", "key"])
cli.run(["secrets", "get", "initialkey"])
assert capsys.readouterr().out == "foo"
capsys.readouterr()
cli.run(["secrets", "users", "list"])
@@ -139,6 +139,8 @@ def test_secrets(
assert len(users) == 1, f"users: {users}"
owner = users[0]
cli.run(["secrets", "rename", "initialkey", "key"])
capsys.readouterr() # empty the buffer
cli.run(["secrets", "list"])
assert capsys.readouterr().out == "key\n"