Add tests for tomb resize, passwd and engrave

This commit is contained in:
Alexandre Pujol 2017-05-01 21:21:25 +01:00
parent 36f5ed8729
commit a609b855c7
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
3 changed files with 53 additions and 0 deletions

19
extras/test/60_resize.sh Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env zsh
export test_description="Testing tomb resize feature"
source ./setup
if test_have_prereq RESIZER; then
test_export "test" # Using already generated tomb
test_expect_success 'Testing resize to 30 MB tomb' '
tt resize -s 30 $tomb -k $tomb_key --unsafe --tomb-pwd $DUMMYPASS
'
test_export "recipient" # Using already generated tomb
test_expect_success 'Testing resize to 30 MB tomb with GnuPG keys' '
tt resize -s 30 $tomb -k $tomb_key -g -r $KEY2
'
fi
test_done

20
extras/test/65_passwd.sh Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env zsh
export test_description="Testing changing tomb password"
source ./setup
test_export "test" # Using already generated tomb
test_expect_success 'Testing tomb with GnuPG keys: passwd' '
tt passwd -k $tomb_key --unsafe \
--tomb-old-pwd $DUMMYPASS --tomb-pwd $DUMMYPASSNEW &&
tt passwd -k $tomb_key --unsafe \
--tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS
'
test_export "recipient" # Using already generated tomb
test_expect_success 'Testing tomb with GnuPG keys: passwd' '
tt passwd -k $tomb_key -g -r $KEY2
'
test_done

View File

@ -0,0 +1,14 @@
#!/usr/bin/env zsh
export test_description="Testing rendering QR Code key"
source ./setup
if test_have_prereq QRENCODE; then
test_export "test"
test_expect_success 'Testing rendering a QR printable key backup' '
tt engrave -k $tomb_key
'
fi
test_done