[ostree] tests: add test for summary file caching
- From: Giuseppe Scrivano <gscrivano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: add test for summary file caching
- Date: Tue, 15 Mar 2016 08:49:57 +0000 (UTC)
commit 2bb25a05b0e4a3945a41ab10ac83ccc3b729bf4c
Author: Giuseppe Scrivano <gscrivan redhat com>
Date: Fri Mar 11 13:04:54 2016 +0100
tests: add test for summary file caching
Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
tests/test-pull-summary-sigs.sh | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-pull-summary-sigs.sh b/tests/test-pull-summary-sigs.sh
index 95375b7..202efda 100755
--- a/tests/test-pull-summary-sigs.sh
+++ b/tests/test-pull-summary-sigs.sh
@@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
-echo "1..5"
+echo "1..6"
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}"
@@ -73,8 +73,25 @@ repo_reinit () {
cd ${test_tmpdir}
repo_reinit
${OSTREE} --repo=repo pull origin main
+assert_has_file repo/tmp/cache/summaries/origin
+assert_has_file repo/tmp/cache/summaries/origin.sig
+
+rm repo/tmp/cache/summaries/origin
+${OSTREE} --repo=repo pull origin main
+assert_has_file repo/tmp/cache/summaries/origin
+
echo "ok pull with signed summary"
+touch repo/tmp/cache/summaries/foo
+touch repo/tmp/cache/summaries/foo.sig
+${OSTREE} --repo=repo prune
+assert_not_has_file repo/tmp/cache/summaries/foo
+assert_not_has_file repo/tmp/cache/summaries/foo.sig
+assert_has_file repo/tmp/cache/summaries/origin
+assert_has_file repo/tmp/cache/summaries/origin.sig
+echo "ok prune summary cache"
+
+
cd ${test_tmpdir}
repo_reinit
mv ${test_tmpdir}/ostree-srv/gnomerepo/summary.sig{,.good}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]