tests: Ensure no dangling commit partials on remote depth pull
authorDan Nicholson <dbn@endlessos.org>
Mon, 11 Jan 2021 23:05:05 +0000 (16:05 -0700)
committerDan Nicholson <dbn@endlessos.org>
Mon, 11 Jan 2021 23:07:29 +0000 (16:07 -0700)
This was already being done on the local depth pull test, so this just
adds the matching logic to the remote depth pull test.

tests/test-pull-depth.sh

index 1206c6c43d7ca9bbd45c9cc5a7b6d9c6bcbc69ee..998a18f552339e46052177400ccb589bceded9c4 100755 (executable)
@@ -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"