aboutsummaryrefslogtreecommitdiff
path: root/src/tests/fill.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-09-10 12:20:13 +0200
committerDaniel Mueller <deso@posteo.net>2021-01-10 21:05:19 -0800
commitb23296e1cc47cf5350835d8a8cca6eb6f5d7d270 (patch)
tree61db1288e6076fd03bc8d9603817df8778c946ce /src/tests/fill.rs
parent23dee1867bba7d899bd806b4ed41d29a2800db89 (diff)
downloadnitrocli-b23296e1cc47cf5350835d8a8cca6eb6f5d7d270.tar.gz
nitrocli-b23296e1cc47cf5350835d8a8cca6eb6f5d7d270.tar.bz2
Add fill command to overwrite SD card
This patch adds the fill command that overwrites the SD card with random data. Similar to the reset command, we always require the user to enter the admin PIN even if is cached.
Diffstat (limited to 'src/tests/fill.rs')
-rw-r--r--src/tests/fill.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/fill.rs b/src/tests/fill.rs
new file mode 100644
index 0000000..70ea081
--- /dev/null
+++ b/src/tests/fill.rs
@@ -0,0 +1,15 @@
+// fill.rs
+
+// Copyright (C) 2020 The Nitrocli Developers
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+use super::*;
+
+// Ignore this test as it takes about one hour to execute
+#[ignore]
+#[test_device(storage)]
+fn fill(model: nitrokey::Model) -> anyhow::Result<()> {
+ let res = Nitrocli::new().model(model).handle(&["fill"]);
+ assert!(res.is_ok());
+ Ok(())
+}