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"