mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-02-02 11:58:28 +00:00
Add main tests for GPG key support
This commit is contained in:
parent
e99a0350fb
commit
166bbdc18c
44
extras/test/20_recipients.sh
Normal file
44
extras/test/20_recipients.sh
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
export test_description="Testing tomb with GnuPG keys"
|
||||
|
||||
source ./setup
|
||||
|
||||
test_export "recipient"
|
||||
test_expect_success 'Testing tomb with GnuPG keys: creation' '
|
||||
tt_dig -s 20 &&
|
||||
tt_forge -g -r $KEY1 &&
|
||||
tt_lock -g -r $KEY1
|
||||
'
|
||||
|
||||
test_expect_success 'Testing tomb with GnuPG keys: open & close' '
|
||||
tt_open -g &&
|
||||
tt_close
|
||||
'
|
||||
|
||||
test_export "default"
|
||||
test_expect_success 'Testing tomb with GnuPG keys using the default recipient' '
|
||||
tt_dig -s 20 &&
|
||||
tt_forge -g &&
|
||||
tt_lock -g &&
|
||||
gpg -d --status-fd 2 $tomb_key 1> /dev/null 2> $TMP/default.tmp &&
|
||||
[[ ! -z "$(grep "Tomb Test 2" $TMP/default.tmp)" ]]
|
||||
'
|
||||
|
||||
test_export "hidden"
|
||||
test_expect_success 'Testing tomb with GnuPG keys using hidden recipient' '
|
||||
tt_dig -s 20 &&
|
||||
tt_forge -g -R $KEY1 &&
|
||||
tt_lock -g -R $KEY1
|
||||
'
|
||||
|
||||
test_export "shared"
|
||||
test_expect_success 'Testing tomb with GnuPG keys and shared tomb' '
|
||||
tt_dig -s 20 &&
|
||||
tt_forge -g -r $KEY1,$KEY2 &&
|
||||
tt_lock -g -r $KEY1 &&
|
||||
tt_open -g &&
|
||||
tt_close
|
||||
'
|
||||
|
||||
test_done
|
Loading…
x
Reference in New Issue
Block a user