sign-pull: improve error handling
Use glnx_* functions in signature related pull code for clear error handling. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
This commit is contained in:
1 parent
584ad40549
commit
cce3864160
2 files changed
+34
-62
No files matched your search
@@ -155,7 +155,7 @@ do
|
||||
if ${OSTREE} --repo=repo pull origin main 2>err.txt; then
|
||||
assert_not_reached "Successful pull with invalid ${engine} signature"
|
||||
fi
|
||||
assert_file_has_content err.txt "Can't verify summary"
|
||||
assert_file_has_content err.txt "signed with unknown key"
|
||||
mv ${test_tmpdir}/ostree-srv/gnomerepo/summary.sig{.good,}
|
||||
echo "ok ${engine} pull with invalid ${engine} summary signature fails"
|
||||
|
||||
@@ -223,7 +223,7 @@ cp ${test_tmpdir}/ostree-srv/gnomerepo/summary.sig{.2,}
|
||||
if ${OSTREE} --repo=repo pull origin main 2>err.txt; then
|
||||
assert_not_reached "Successful pull with old summary"
|
||||
fi
|
||||
assert_file_has_content err.txt "Can't verify summary"
|
||||
assert_file_has_content err.txt "signed with unknown key"
|
||||
assert_has_file repo/tmp/cache/summaries/origin
|
||||
assert_has_file repo/tmp/cache/summaries/origin.sig
|
||||
cmp repo/tmp/cache/summaries/origin ${test_tmpdir}/ostree-srv/gnomerepo/summary.1 >&2
|
||||
|
||||
Reference in new issue
Block a user