Allows initialization without Reset permission (#673)

* Allows initialization without Reset permission

This PR is useful for all implementations that can trigger a reboot
without user intervention. In these cases, we don't want to allow the
Reset command. It should only be allowed after a user initiated power
cycle.

Adds tests to the new functionality and a few other coverage holes.

* Moves soft reset parameters into Env
This commit is contained in:
kaczmarczyck
2024-01-09 18:30:35 +01:00
committed by GitHub
parent 0185d1e443
commit ba0d717d88
8 changed files with 180 additions and 8 deletions

View File

@@ -113,3 +113,14 @@ impl From<StoreError> for Error {
}
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_store_error() {
assert_eq!(Error::from(StoreError::StorageError), Error::Storage);
assert_eq!(Error::from(StoreError::InvalidStorage), Error::Internal);
}
}