Skip to content

Commit c8c9420

Browse files
committed
Add integration test for grant_secret
1 parent 50593e3 commit c8c9420

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/integration/test_secrets.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,15 @@ async def test_remove_secret(event_loop):
6363

6464
secrets = await model.list_secrets()
6565
assert len(secrets) == 0
66+
67+
68+
@base.bootstrapped
69+
@pytest.mark.bundle
70+
async def test_grant_secret(event_loop):
71+
async with base.CleanModel() as model:
72+
secret = await model.add_secret(name='my-apitoken', data_args=['token=34ae35facd4'])
73+
assert secret.startswith('secret:')
74+
75+
await model.deploy('ubuntu')
76+
77+
await model.grant_secret('my-apitoken', 'ubuntu')

0 commit comments

Comments
 (0)