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

test: add test for LUKS version 2 #497

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions tests/test-verify-volume-encryption.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@
that: luks_dump.stdout is search(__pattern, multiline=True)
msg: Wrong key size for volume {{ storage_test_volume.name }}
vars:
__pattern: >-
^MK bits:\s+{{ storage_test_volume.encryption_key_size }}$
__key_size: "{{ storage_test_volume.encryption_key_size | string }}"
__pattern: "{{
'^MK bits:\\s+' ~ __key_size ~ '$'
if storage_test_volume.encryption_luks_version | d('luks1') == 'luks1'
else '^\\s+Key:\\s+' ~ __key_size ~ ' bits$' }}"
when:
- _storage_test_volume_present
- storage_test_volume.encryption
Expand All @@ -84,8 +87,12 @@
msg: Wrong cipher for volume {{ storage_test_volume.name }}
vars:
__cipher: "{{ storage_test_volume.encryption_cipher.split('-')[1:] |
join('-') }}"
__pattern: "^Cipher mode:\\s+{{ __cipher }}$"
join('-')
if storage_test_volume.encryption_luks_version | d('luks1') == 'luks1'
else storage_test_volume.encryption_cipher }}"
__pattern: "{{ '^Cipher mode:\\s+' ~ __cipher ~ '$'
if storage_test_volume.encryption_luks_version | d('luks1') == 'luks1'
else '^\\s+Cipher:\\s+' ~ __cipher ~ '$' }}"
when:
- _storage_test_volume_present
- storage_test_volume.encryption
Expand Down
Loading
Loading