mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-22 04:25:12 +00:00
Add tests for tomb resize, passwd and engrave
This commit is contained in:
parent
36f5ed8729
commit
a609b855c7
19
extras/test/60_resize.sh
Normal file
19
extras/test/60_resize.sh
Normal 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
20
extras/test/65_passwd.sh
Normal 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
|
14
extras/test/70_qrencode.sh
Normal file
14
extras/test/70_qrencode.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user