From 27f2bb834da85aba3935e14c6069a07f03ac6a45 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 30 Dec 2018 12:46:20 +0100 Subject: Fix Storage volume detection for test cases It seems that with newer firmeware, the model string in the lsblk output is Nitrokey_Storage instead of Nitrokey Storage. Therefore this patch replaces underscores with spaces to account for both versions. --- tests/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/device.rs b/tests/device.rs index a6098b7..26afa62 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -19,7 +19,7 @@ fn count_nitrokey_block_devices() -> usize { .expect("Could not list block devices"); String::from_utf8_lossy(&output.stdout) .split("\n") - .filter(|&s| s == "Nitrokey Storage") + .filter(|&s| s.replace("_", " ") == "Nitrokey Storage") .count() } -- cgit v1.2.1