diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2015-11-09 11:07:16 +0000 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2015-11-16 11:07:55 +0100 |
commit | 11bc9e58c1a6da8cb6053ea84f2d9e622838bcb2 (patch) | |
tree | 19bda345cd6f49b42488d09d7dd504524c237503 /tests/test-prune.sh | |
parent | 68f70d8e747d64a2b5ef525c9fec95c258eeabaa (diff) | |
download | ostree-11bc9e58c1a6da8cb6053ea84f2d9e622838bcb2.tar.gz |
tests: add tests for prune --keep-younger-than=DATE
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'tests/test-prune.sh')
-rw-r--r-- | 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 c73a5cae..a4b6fc20 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" |