aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-08-31 18:23:26 -0700
committerDaniel Mueller <deso@posteo.net>2020-08-31 18:23:26 -0700
commit1abd0153b5fbacf5fff89406dc34924f84205c3a (patch)
treeaaadb319d2b9fe5e6078c0c63490f89473353546 /src/tests
parent147d01663f9b95c6819d3c6afe8694cd291dbc3d (diff)
downloadnitrocli-1abd0153b5fbacf5fff89406dc34924f84205c3a.tar.gz
nitrocli-1abd0153b5fbacf5fff89406dc34924f84205c3a.tar.bz2
fixup! Change default OTP format to base32
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/otp.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tests/otp.rs b/src/tests/otp.rs
index f923170..837b075 100644
--- a/src/tests/otp.rs
+++ b/src/tests/otp.rs
@@ -23,7 +23,8 @@ use crate::args;
#[test_device]
fn set_invalid_slot_raw(model: nitrokey::Model) {
- let (rc, out, err) = Nitrocli::with_model(model).run(&["otp", "set", "100", "name", "1234"]);
+ let (rc, out, err) =
+ Nitrocli::with_model(model).run(&["otp", "set", "100", "name", "1234", "-f", "hex"]);
assert_ne!(rc, 0);
assert_eq!(out, b"");
@@ -32,7 +33,7 @@ fn set_invalid_slot_raw(model: nitrokey::Model) {
#[test_device]
fn set_invalid_slot(model: nitrokey::Model) {
- let res = Nitrocli::with_model(model).handle(&["otp", "set", "100", "name", "1234"]);
+ let res = Nitrocli::with_model(model).handle(&["otp", "set", "100", "name", "1234", "-f", "hex"]);
assert_eq!(
res.unwrap_lib_err(),
@@ -54,7 +55,7 @@ fn status(model: nitrokey::Model) -> crate::Result<()> {
let mut ncli = Nitrocli::with_model(model);
// Make sure that we have at least something to display by ensuring
// that there is one slot programmed.
- let _ = ncli.handle(&["otp", "set", "0", "the-name", "123456"])?;
+ let _ = ncli.handle(&["otp", "set", "0", "the-name", "123456", "-f", "hex"])?;
let out = ncli.handle(&["otp", "status"])?;
assert!(re.is_match(&out), out);