Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple tokens #312

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions stratis_cli_cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,77 @@ def test_pool_create_encrypted(self):
True,
)

@skip(_skip_condition(1))
def test_pool_create_encrypted_multiple_keys(self):
"""
Test creating an encrypted pool with multiple keys bound.
"""
with KernelKey("test-password") as key_desc:
pool_name = p_n()
self._unittest_command(
[
_STRATIS_CLI,
"pool",
"create",
"--key-desc",
key_desc,
pool_name,
StratisCliCertify.DISKS[0],
],
0,
True,
True,
)
self._unittest_command(
[
_STRATIS_CLI,
"pool",
"bind",
"keyring",
pool_name,
key_desc,
],
0,
True,
True,
)

@skip(_skip_condition(1))
def test_pool_create_encrypted_rebind_with_new_key(self):
"""
Test creating an encrypted pool with multiple keys bound.
"""
with KernelKey("test-password") as key_desc:
pool_name = p_n()
self._unittest_command(
[
_STRATIS_CLI,
"pool",
"create",
"--key-desc",
key_desc,
pool_name,
StratisCliCertify.DISKS[0],
],
0,
True,
True,
)
with KernelKey("new-password") as new_desc:
self._unittest_command(
[
_STRATIS_CLI,
"pool",
"rebind",
"keyring",
pool_name,
new_desc,
],
0,
True,
True,
)

@skip(_skip_condition(3))
def test_pool_create_encrypted_with_cache(self):
"""
Expand Down