tests: add tests for prune --keep-younger-than=DATE
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
68f70d8e74
commit
11bc9e58c1
|
|
@ -82,4 +82,15 @@ ${CMD_PREFIX} ostree --repo=repo prune --delete-commit=$COMMIT_TO_DELETE
|
||||||
find repo/objects -name '*.tombstone-commit' | wc -l > tombstonecommitcount
|
find repo/objects -name '*.tombstone-commit' | wc -l > tombstonecommitcount
|
||||||
assert_file_has_content tombstonecommitcount "^1$"
|
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"
|
echo "ok prune"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue