Set options for KV backends
Ensure KV backend is created as a v2 backend by using explicit provision of options when enabling the secret backend. Change-Id: Ief0a26c8a1adb9f6be39fa497222f809994c11d0
This commit is contained in:
parent
f4bf636c87
commit
54a29e06ab
|
@ -327,7 +327,8 @@ def configure_secret_backend(client, name):
|
|||
if '{}/'.format(name) not in client.list_secret_backends():
|
||||
client.enable_secret_backend(backend_type='kv',
|
||||
description='Charm created KV backend',
|
||||
mount_point=name)
|
||||
mount_point=name,
|
||||
options={'version': 2})
|
||||
|
||||
|
||||
def configure_policy(client, name, hcl):
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -57,4 +57,4 @@ commands = {posargs}
|
|||
|
||||
[flake8]
|
||||
# E402 ignore necessary for path append before sys module import in actions
|
||||
ignore = E402
|
||||
ignore = E402,W504
|
||||
|
|
|
@ -342,7 +342,8 @@ class TestLibCharmVault(unit_tests.test_utils.CharmTestCase):
|
|||
hvac_client.enable_secret_backend.assert_called_once_with(
|
||||
backend_type='kv',
|
||||
description=mock.ANY,
|
||||
mount_point='test')
|
||||
mount_point='test',
|
||||
options={'version': 2})
|
||||
|
||||
def test_configure_secret_backend_noop(self):
|
||||
hvac_client = mock.MagicMock()
|
||||
|
|
Loading…
Reference in New Issue