summaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authorCyril Brulebois <ckb@riseup.net>2019-01-05 21:36:33 +0100
committerCyril Brulebois <ckb@riseup.net>2019-01-05 22:06:02 +0100
commit400afa7df67cd2d88db21323ea79d1957fd2b945 (patch)
tree3fe6cba41dabb2a5c4f6b7421fa761c4c7f91a33 /features
parent41d70af244dd148119b302d485d490bcd8bd9688 (diff)
Test suite: switch the system partition flags check to the new helper (refs: #16003).
Diffstat (limited to 'features')
-rw-r--r--features/step_definitions/usb.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/features/step_definitions/usb.rb b/features/step_definitions/usb.rb
index 5081d5e..189c872 100644
--- a/features/step_definitions/usb.rb
+++ b/features/step_definitions/usb.rb
@@ -877,13 +877,13 @@ Then /^the system partition on "([^"]+)" has the expected flags$/ do |name|
disk_dev = $vm.disk_dev(name)
part_dev = disk_dev + "1"
- # Extract partition area:
- part_details = $vm.execute_successfully("udisksctl info --block-device #{part_dev} | sed '1,/^ org\.freedesktop\.UDisks2\.Partition:$/d'").stdout
+ # Look at the flags from the partition area:
+ udisks_info = $vm.execute_successfully("udisksctl info --block-device #{part_dev}").stdout
+ flags = parse_udisksctl_info(udisks_info)['org.freedesktop.UDisks2.Partition']['Flags']
# See SYSTEM_PARTITION_FLAGS in create-usb-image-from-iso: 0xd000000000000005,
# displayed in decimal (14987979559889010693) in udisksctl's output:
expected_flags = 0xd000000000000005
- flags = part_details.scan(/^\s+Flags:\s+(\d+)$/).first.first
assert(flags == expected_flags.to_s,
"Got #{flags} as partition flags on #{part_dev} (for #{name}), instead of the expected #{expected_flags}")
end