summaryrefslogtreecommitdiff
path: root/tests/test-commit-sign.sh
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2015-11-23 11:04:31 -0500
committerMatthew Barnes <mbarnes@redhat.com>2015-11-23 14:22:45 -0500
commitdf75fc232a3d9191be6e2393400a2eff9602f43a (patch)
treea96355873429fcbb85e145885985ad3d030b92d0 /tests/test-commit-sign.sh
parent5307af5a7adc79af331c6da804c0ea75cb6adf22 (diff)
downloadostree-df75fc232a3d9191be6e2393400a2eff9602f43a.tar.gz
repo: Never delete .commitmeta files
Do not delete a .commitmeta file after removing the last metadata entry. This way a client will pull the empty .commitmeta file and overwrite old metadata as expected. https://bugzilla.gnome.org/750459
Diffstat (limited to 'tests/test-commit-sign.sh')
-rwxr-xr-xtests/test-commit-sign.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh
index 2288d09b..0dfbb768 100755
--- a/tests/test-commit-sign.sh
+++ b/tests/test-commit-sign.sh
@@ -119,4 +119,13 @@ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo gpg-sign --gpg-h
${CMD_PREFIX} ostree --repo=repo pull origin main
${CMD_PREFIX} ostree --repo=repo show main | grep -o 'Found [[:digit:]] signature' > show
assert_file_has_content show 'Found 1 signature'
+
+# Delete the signature from the commit so the detached metadata is empty,
+# then pull and verify the signature is also deleted on the client side.
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo gpg-sign --gpg-homedir=${SRCDIR}/gpghome --delete main $keyid
+${CMD_PREFIX} ostree --repo=repo pull origin main
+if ${CMD_PREFIX} ostree --repo=repo show main | grep -o 'Found [[:digit:]] signature'; then
+ assert_not_reached
+fi
+
rm -rf repo gnomerepo-files