[ostree] tests: add tests for prune --keep-younger-than=DATE
- From: Giuseppe Scrivano <gscrivano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: add tests for prune --keep-younger-than=DATE
- Date: Mon, 16 Nov 2015 10:38:01 +0000 (UTC)
commit 11bc9e58c1a6da8cb6053ea84f2d9e622838bcb2
Author: Giuseppe Scrivano <gscrivan redhat com>
Date: Mon Nov 9 11:07:16 2015 +0000
tests: add tests for prune --keep-younger-than=DATE
Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
tests/test-prune.sh | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-prune.sh b/tests/test-prune.sh
index c73a5ca..a4b6fc2 100644
--- a/tests/test-prune.sh
+++ b/tests/test-prune.sh
@@ -82,4 +82,15 @@ ${CMD_PREFIX} ostree --repo=repo prune --delete-commit=$COMMIT_TO_DELETE
find repo/objects -name '*.tombstone-commit' | wc -l > tombstonecommitcount
assert_file_has_content tombstonecommitcount "^1$"
+${CMD_PREFIX} ostree prune --repo=repo --refs-only --depth=0 -v
+find repo/objects -name '*.commit' | wc -l > commitcount
+assert_file_has_content commitcount "^1$"
+${CMD_PREFIX} ostree --repo=repo commit --branch=test -m test -s test tree --timestamp="2010-10-29 12:43:29
+0000"
+${CMD_PREFIX} ostree --repo=repo commit --branch=test -m test -s test tree --timestamp="2005-10-29 12:43:29
+0000"
+find repo/objects -name '*.commit' | wc -l > commitcount
+assert_file_has_content commitcount "^3$"
+${CMD_PREFIX} ostree --repo=repo prune --keep-younger-than="2015-10-29 12:43:29 +0000"
+find repo/objects -name '*.commit' | wc -l > commitcount
+assert_file_has_content commitcount "^1$"
+
echo "ok prune"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]