[ostree] Add a bit more testing for prune
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Add a bit more testing for prune
- Date: Sat, 29 Jun 2013 18:03:17 +0000 (UTC)
commit aa1eb19eeaf96cfbaff02d3c1757c509a9579e14
Author: Colin Walters <walters verbum org>
Date: Sat Jun 29 14:02:17 2013 -0400
Add a bit more testing for prune
tests/t0000-basic.sh | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/tests/t0000-basic.sh b/tests/t0000-basic.sh
index 4943a91..11da6a5 100755
--- a/tests/t0000-basic.sh
+++ b/tests/t0000-basic.sh
@@ -19,7 +19,7 @@
set -e
-echo "1..31"
+echo "1..32"
. $(dirname $0)/libtest.sh
@@ -226,3 +226,15 @@ ${CMD_PREFIX} ostree --repo=repo3 pull-local --remote=aremote repo test2
ostree --repo=repo3 rev-parse aremote/test2
echo "ok pull-local with --remote arg"
+cd ${test_tmpdir}
+ostree --repo=repo3 prune
+find repo3/objects -name '*.commit' > objlist-before-prune
+rm repo3/refs/heads/* repo3/refs/remotes/* -rf
+ostree --repo=repo3 prune --refs-only
+find repo3/objects -name '*.commit' > objlist-after-prune
+if cmp -s objlist-before-prune objlist-after-prune; then
+ echo "Prune didn't delete anything!"; exit 1
+fi
+rm repo3 objlist-before-prune objlist-after-prune -rf
+echo "ok prune"
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]