tests: Make failing to kill the GPG agent non-fatal

It's not working for me in `make check` on a RHEL 7 Workstation,
apparently because no GPG agent is spawned.  I'm guessing this has
something to do with the GPG version?

The downside of this is we will be less likely to notice if GPG
changes again and we start leaking agents like we're in The Matrix
Reloaded.  But the real solution to that is containers anyways.

Closes: #233
Approved by: smcv
This commit is contained in:
Colin Walters 2016-03-31 13:46:16 -04:00 committed by Colin Walters (automation)
parent 9dafc82024
commit bdf24cdc04
6 changed files with 9 additions and 5 deletions

View File

@ -349,3 +349,7 @@ skip_without_fuse () {
exit 0 exit 0
fi fi
} }
libtest_cleanup_gpg () {
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye || true
}

View File

@ -132,6 +132,6 @@ if ${CMD_PREFIX} ostree --repo=repo show main | grep -o 'Found [[:digit:]] signa
fi fi
rm -rf repo gnomerepo-files rm -rf repo gnomerepo-files
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye libtest_cleanup_gpg
echo "ok" echo "ok"

View File

@ -78,6 +78,6 @@ if ${OSTREE} show test2 | grep -o 'Found [[:digit:]] signature'; then
assert_not_reached assert_not_reached
fi fi
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye libtest_cleanup_gpg
echo "ok" echo "ok"

View File

@ -122,4 +122,4 @@ echo "ok pull mirror with invalid summary sig and no verification"
# echo "ok pull mirror with signed summary covering static deltas" # echo "ok pull mirror with signed summary covering static deltas"
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye libtest_cleanup_gpg

View File

@ -134,4 +134,4 @@ grep static-deltas summary.txt > static-deltas.txt
assert_file_has_content static-deltas.txt \ assert_file_has_content static-deltas.txt \
$(${OSTREE} --repo=repo rev-parse origin:main) $(${OSTREE} --repo=repo rev-parse origin:main)
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye libtest_cleanup_gpg

View File

@ -143,5 +143,5 @@ if ${OSTREE} pull R2:main >/dev/null 2>&1; then
fi fi
${OSTREE} pull R3:main >/dev/null ${OSTREE} pull R3:main >/dev/null
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye libtest_cleanup_gpg
echo "ok" echo "ok"