summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-12-30 12:46:20 +0100
committerRobin Krahl <robin.krahl@ireas.org>2018-12-30 12:46:20 +0100
commit27f2bb834da85aba3935e14c6069a07f03ac6a45 (patch)
treea6607cbd227eeca5310203d16ae310b91ace1601
parent4c443110f8e10de905a48b0af1ef15fcd5a10b75 (diff)
downloadnitrokey-rs-27f2bb834da85aba3935e14c6069a07f03ac6a45.tar.gz
nitrokey-rs-27f2bb834da85aba3935e14c6069a07f03ac6a45.tar.bz2
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.
-rw-r--r--tests/device.rs2
1 files changed, 1 insertions, 1 deletions
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()
}