Commit dc054d38 authored by Cyril Brulebois's avatar Cyril Brulebois

Test suite: unhardcode /dev/sda1 (refs: #16003).

Let's use the same kind of calls as in the check_{disk,part}_integrity
helpers to get the block device to work on.
parent cbbaf4da
...@@ -839,11 +839,12 @@ Then /^the UUID of the FAT filesystem on the system partition on "([^"]+)" was r ...@@ -839,11 +839,12 @@ Then /^the UUID of the FAT filesystem on the system partition on "([^"]+)" was r
end end
end end
Then /^the label of the FAT filesystem on the system partition is "([^"]+)"$/ do |label| Then /^the label of the FAT filesystem on the system partition on "([^"]+)" is "([^"]+)"$/ do |name, label|
partition = '/dev/sda1' disk_dev = $vm.disk_dev(name)
fs_label = $vm.execute_successfully("udisksctl info --block-device #{partition} | awk '/IdLabel:/ {print $2}'").stdout.chomp part_dev = disk_dev + "1"
fs_label = $vm.execute_successfully("udisksctl info --block-device #{part_dev} | awk '/IdLabel:/ {print $2}'").stdout.chomp
assert(label == fs_label, assert(label == fs_label,
"FS label on #{partition} is #{fs_label} instead of the expected #{label}") "FS label on #{part_dev} is #{fs_label} instead of the expected #{label}")
end end
Then /^the system partition on "([^"]+)" has the expected flags$/ do |name| Then /^the system partition on "([^"]+)" has the expected flags$/ do |name|
......
...@@ -137,5 +137,5 @@ Feature: Installing Tails to a USB drive ...@@ -137,5 +137,5 @@ Feature: Installing Tails to a USB drive
And the system partition on "usbimage" is an EFI system partition And the system partition on "usbimage" is an EFI system partition
And the FAT filesystem on the system partition on "usbimage" is at least 4000M large And the FAT filesystem on the system partition on "usbimage" is at least 4000M large
And the UUID of the FAT filesystem on the system partition on "usbimage" was randomized And the UUID of the FAT filesystem on the system partition on "usbimage" was randomized
And the label of the FAT filesystem on the system partition is "TAILS" And the label of the FAT filesystem on the system partition on "usbimage" is "TAILS"
And the system partition on "usbimage" has the expected flags And the system partition on "usbimage" has the expected flags
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment