summaryrefslogtreecommitdiff
path: root/tests/pull-test.sh
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-11-03 18:43:00 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-06 19:41:07 +0000
commit015513b8f979ab0769ad36da868544378e553041 (patch)
tree43324a4cbec5cc42cb0960ad5ed9269018c98dc6 /tests/pull-test.sh
parent7296bf3dcc190d6d137790ff3f40f147e6ef742f (diff)
downloadostree-015513b8f979ab0769ad36da868544378e553041.tar.gz
lib/pull: Avoid error if current with --require-static-deltas
A tricky thing here that caused this to go past a lot of our tests is that the code was mostly OK if there was an available delta from an older commit. But this case broke if we e.g. had a new OS deployment and did a `--require-static-deltas` pull, i.e. the initial state. I cleaned up our "find static delta state" function to return an enumeration, and extended it with an "already have the commit" state. A problem I then hit is that we've historically fetched detached metadata for non-delta pulls, even if the commit hasn't changed. I decided not to do that for `--require-static-deltas` pulls for now; otherwise the code gets notably more complex. Closes: https://github.com/ostreedev/ostree/issues/1321 Closes: #1323 Approved by: jlebon
Diffstat (limited to 'tests/pull-test.sh')
-rw-r--r--tests/pull-test.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pull-test.sh b/tests/pull-test.sh
index 3f8030e0..c09feb30 100644
--- a/tests/pull-test.sh
+++ b/tests/pull-test.sh
@@ -381,6 +381,12 @@ fi
${CMD_PREFIX} ostree --repo=repo fsck
done
+# Test no-op with deltas: https://github.com/ostreedev/ostree/issues/1321
+cd ${test_tmpdir}
+repo_init --no-gpg-verify
+${CMD_PREFIX} ostree --repo=repo pull origin main
+${CMD_PREFIX} ostree --repo=repo pull --require-static-deltas origin main
+
cd ${test_tmpdir}
repo_init --no-gpg-verify
${CMD_PREFIX} ostree --repo=repo pull origin main@${prev_rev}