aboutsummaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'unittest')
-rw-r--r--unittest/test2.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/unittest/test2.cc b/unittest/test2.cc
index 8e3dacc..d79042a 100644
--- a/unittest/test2.cc
+++ b/unittest/test2.cc
@@ -126,6 +126,26 @@ TEST_CASE("test device internal status with various commands", "[fast]") {
REQUIRE(production_status.data().SD_CardID_u32 != 0);
}
+TEST_CASE("setup hidden volume test", "[hidden]") {
+ Stick20 stick;
+ bool connected = stick.connect();
+ REQUIRE(connected == true);
+ Log::instance().set_loglevel(Loglevel::DEBUG_L2);
+ stick10::LockDevice::CommandTransaction::run(stick);
+ this_thread::sleep_for(2000ms);
+
+ execute_password_command<EnableEncryptedPartition>(stick, "123456");
+
+ auto p = get_payload<stick20::SetupHiddenVolume>();
+ p.set_defaults();
+ auto hidden_volume_password = "123123123";
+ strcpyT(p.HiddenVolumePassword_au8, hidden_volume_password);
+ stick20::SetupHiddenVolume::CommandTransaction::run(stick, p);
+ this_thread::sleep_for(2000ms);
+
+ execute_password_command<EnableHiddenEncryptedPartition>(stick, hidden_volume_password);
+}
+
TEST_CASE("general test", "[test]") {
Stick20 stick;
bool connected = stick.connect();