aboutsummaryrefslogtreecommitdiff
path: root/unittest/test2.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-10-28 16:29:55 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-11-26 18:56:26 +0100
commitce30b49b4d50f2eff39a40ddd0c02ad96b78654c (patch)
tree087d51ac8ac9dd43194b8546bab7eaab1e354d6b /unittest/test2.cc
parent6343eea03980627cb763de777af6b316130bdf43 (diff)
downloadlibnitrokey-ce30b49b4d50f2eff39a40ddd0c02ad96b78654c.tar.gz
libnitrokey-ce30b49b4d50f2eff39a40ddd0c02ad96b78654c.tar.bz2
Make packet variables' names more clear
General fixes Remove default values from hidden volume setup command rename password -> pin Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test2.cc')
-rw-r--r--unittest/test2.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/unittest/test2.cc b/unittest/test2.cc
index f5d2b28..9aaef3f 100644
--- a/unittest/test2.cc
+++ b/unittest/test2.cc
@@ -40,7 +40,7 @@ TEST_CASE("long operation test", "[test_long]") {
// execute_password_command<FillSDCardWithRandomChars>(stick, "12345678", 'P');
auto p = get_payload<FillSDCardWithRandomChars>();
p.set_defaults();
- strcpyT(p.password, "12345678");
+ strcpyT(p.admin_pin, "12345678");
FillSDCardWithRandomChars::CommandTransaction::run(stick, p);
this_thread::sleep_for(1000ms);
@@ -143,7 +143,9 @@ TEST_CASE("setup hidden volume test", "[hidden]") {
execute_password_command<EnableEncryptedPartition>(stick, "123456");
auto p = get_payload<stick20::SetupHiddenVolume>();
- p.set_defaults();
+ p.SlotNr_u8 = 0;
+ p.StartBlockPercent_u8 = 70;
+ p.EndBlockPercent_u8 = 90;
auto hidden_volume_password = "123123123";
strcpyT(p.HiddenVolumePassword_au8, hidden_volume_password);
stick20::SetupHiddenVolume::CommandTransaction::run(stick, p);