From 7ed2f1e5af303ffa5e697d8c1dfd1fc0671818f8 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 9 Aug 2016 15:41:36 -0700 Subject: [PATCH] tests: Test that local pulls do not use deltas Pulls from local repos now default to disabling static deltas so that objects are copied. To check this is the case, see if the object files are hardlinked after pulling. Closes: #447 Closes: #448 Approved by: cgwalters --- tests/test-local-pull.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test-local-pull.sh b/tests/test-local-pull.sh index a9ac1278..9e8c8a00 100755 --- a/tests/test-local-pull.sh +++ b/tests/test-local-pull.sh @@ -26,7 +26,7 @@ unset OSTREE_GPG_HOME skip_without_user_xattrs -echo "1..7" +echo "1..8" setup_test_repository "archive-z2" echo "ok setup" @@ -95,3 +95,13 @@ ${OSTREE} summary -u update --gpg-sign=${TEST_GPG_KEYID_1} --gpg-homedir=${TEST_ ${CMD_PREFIX} ostree --repo=repo6 pull-local --remote=origin --gpg-verify-summary repo test2 2>&1 echo "ok --gpg-verify-summary" + +mkdir repo7 +${CMD_PREFIX} ostree --repo=repo7 init --mode="archive-z2" +${CMD_PREFIX} ostree --repo=repo7 pull-local repo +${CMD_PREFIX} ostree --repo=repo7 fsck +for src_object in `find repo/objects -name '*.filez'`; do + dst_object=${src_object/repo/repo7} + assert_files_hardlinked "$src_object" "$dst_object" +done +echo "ok pull-local z2 to z2 default hardlink"