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

fix: Use blkid instead of lsblk in tests to get partition table #480

Merged
merged 1 commit into from
Aug 27, 2024
Merged
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
6 changes: 4 additions & 2 deletions tests/tests_lvm_pool_members.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@
disks: "{{ [unused_disks[0]] }}"

- name: Get the partition table type on disk removed from the VG
command: lsblk -o PTTYPE --noheadings --nodeps /dev/{{ unused_disks[1] }}
command: blkid -p -ovalue -s PTTYPE /dev/{{ unused_disks[1] }}
register: storage_test_removed_pttype
changed_when: false
vojtechtrefny marked this conversation as resolved.
Show resolved Hide resolved
failed_when: not storage_test_removed_pttype.rc in [0, 2]

- name: Verify that removing the PV from the VG also removed the partition table
assert:
Expand Down Expand Up @@ -289,9 +290,10 @@
size: "{{ volume_size }}"

- name: Get the partition table type on disk removed from the VG
command: lsblk -o PTTYPE --noheadings --nodeps /dev/{{ unused_disks[0] }}
command: blkid -p -ovalue -s PTTYPE /dev/{{ unused_disks[0] }}
register: storage_test_removed_pttype
changed_when: false
failed_when: not storage_test_removed_pttype.rc in [0, 2]

- name: Verify that removing the PV from the VG also removed the partition table
assert:
Expand Down
Loading