summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2021-01-11 16:05:05 -0700
committerDan Nicholson <dbn@endlessos.org>2021-01-11 16:07:29 -0700
commitb4f06b47a38cea303f678e20d89943a2187b963f (patch)
tree3d9225a10074bc1232bcc4e3c8adaaf9c0ca652c /tests
parent0b90f1f9a84bbd830e4e56b1d3a43bdf04e405ce (diff)
downloadostree-b4f06b47a38cea303f678e20d89943a2187b963f.tar.gz
tests: Ensure no dangling commit partials on remote depth pull
This was already being done on the local depth pull test, so this just adds the matching logic to the remote depth pull test.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-pull-depth.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-pull-depth.sh b/tests/test-pull-depth.sh
index 1206c6c4..998a18f5 100755
--- a/tests/test-pull-depth.sh
+++ b/tests/test-pull-depth.sh
@@ -35,21 +35,31 @@ ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat
${CMD_PREFIX} ostree --repo=repo pull --depth=0 origin main
find repo/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^1$"
+find repo/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
${CMD_PREFIX} ostree --repo=repo pull --depth=0 origin main
find repo/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^1$"
+find repo/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
${CMD_PREFIX} ostree --repo=repo pull --depth=1 origin main
find repo/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^2$"
+find repo/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
${CMD_PREFIX} ostree --repo=repo pull --depth=1 origin main
find repo/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^2$"
+find repo/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
${CMD_PREFIX} ostree --repo=repo pull --depth=-1 origin main
find repo/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^3$"
+find repo/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
echo "ok pull depth"