From ca737e96c7688cc214e9cb514b18861b4671651c Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 10 Sep 2020 12:20:13 +0200 Subject: 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. --- src/tests/fill.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/tests/fill.rs (limited to 'src/tests/fill.rs') 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(()) +} -- cgit v1.2.1