diff --git a/extras/test/20_recipients.sh b/extras/test/20_recipients.sh index 185f1c3..548f0d2 100644 --- a/extras/test/20_recipients.sh +++ b/extras/test/20_recipients.sh @@ -4,6 +4,8 @@ export test_description="Testing tomb with GnuPG keys" source ./setup +if test_have_prereq GPGRCPT; then + test_export "recipient" test_expect_success 'Testing tomb with GnuPG keys: creation' ' tt_dig -s 20 && @@ -54,4 +56,6 @@ test_expect_success 'Testing tomb creation with untrusted GnuPG keys' ' test_must_fail tt_forge -g -r $KEY_UNTRUSTED ' +fi + test_done diff --git a/extras/test/60_resize.sh b/extras/test/60_resize.sh index a8f0290..3c430c1 100644 --- a/extras/test/60_resize.sh +++ b/extras/test/60_resize.sh @@ -9,13 +9,15 @@ if test_have_prereq RESIZER; then test_expect_success 'Testing resize to 30 MB tomb' ' tt resize -s 30 $tomb -k $tomb_key --unsafe --tomb-pwd $DUMMYPASS ' - +if test_have_prereq GPGRCPT; then 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 +fi # RESIZER + if test_have_prereq RESIZER SPHINX ORACLE; then test_export "sphinx_test" # Using already generated tomb test_expect_success 'Testing resize to 30 MB tomb (sphinx)' ' diff --git a/extras/test/65_passwd.sh b/extras/test/65_passwd.sh index b549da8..b3114a1 100644 --- a/extras/test/65_passwd.sh +++ b/extras/test/65_passwd.sh @@ -12,11 +12,15 @@ test_expect_success 'Testing tomb with GnuPG keys: passwd' ' --tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS ' +if test_have_prereq GPGRCPT; then + test_export "recipient" # Using already generated tomb test_expect_success 'Testing tomb with GnuPG keys: passwd' ' tt passwd -k $tomb_key -g -r $KEY2 ' +fi + if test_have_prereq SPHINX ORACLE; then test_export "sphinx_test" # Using already generated tomb test_expect_success 'Testing changing tomb password with sphinx' ' diff --git a/extras/test/80_steganography.sh b/extras/test/80_steganography.sh index 233710a..f350b9b 100644 --- a/extras/test/80_steganography.sh +++ b/extras/test/80_steganography.sh @@ -33,6 +33,7 @@ if test_have_prereq STEGHIDE; then tt_close ' +if test_have_prereq GPGRCPT; then test_export "recipient" # Using already generated tomb cp -f "$TEST_HOME/arditi.jpg" "$tomb_img" test_expect_success 'Testing tomb with GnuPG keys and steganographic: bury' ' @@ -60,7 +61,9 @@ if test_have_prereq STEGHIDE; then tt open -k $tomb_img $tomb -g --unsafe --tomb-pwd $DUMMYPASS && tt_close ' -fi +fi # GPGRCPT + +fi # STEGHIDE if test_have_prereq PYTHON2 CLOAKIFY DECLOAKIFY; then test_expect_success 'Testing tomb and steganographic: cloak' ' diff --git a/extras/test/90_setkey.sh b/extras/test/90_setkey.sh index 737a012..3ec7ae5 100755 --- a/extras/test/90_setkey.sh +++ b/extras/test/90_setkey.sh @@ -18,6 +18,7 @@ test_expect_success 'Testing set key' ' tt_close ' +if test_have_prereq GPGRCPT; then test_export "recipient" # Using already generated tomb test_expect_success 'Testing tomb with GnuPG keys: setkey' ' tt forge $tomb_key_new -g -r $KEY2 --ignore-swap --unsafe && @@ -25,6 +26,7 @@ test_expect_success 'Testing tomb with GnuPG keys: setkey' ' tt open -k $tomb_key_new $tomb -g && tt_close ' +fi if test_have_prereq SPHINX ORACLE; then test_export "sphinx_test" # Using already generated tomb diff --git a/extras/test/setup b/extras/test/setup index ba03251..3a2478d 100755 --- a/extras/test/setup +++ b/extras/test/setup @@ -61,6 +61,8 @@ command -v doas > /dev/null && test_set_prereq DOAS # GnuPG config +#test_set_prereq GPGRCPT +if test_have_prereq GPGRCPT; then unset GNUPGHOME unset GPG_AGENT_INFO export GNUPGHOME="$TEST_HOME/gnupg/" @@ -69,8 +71,8 @@ export KEY2="0B2235E660753AB0475FB3E23DC836481F44B31E" export SUBKEY1="D89BE71A935779961C130E50D9D7ACED39D3991C!" export SUBKEY2="843077BF7FD4A9C7BBFC3A69F065568B4F7D6CA9!" export KEY_UNTRUSTED="E6195F61F5EBA81FE4B1565AAC844B92004240CD" - chmod 700 "$GNUPGHOME" +fi # Dummy passwords used in the tests suite