tests: Add a testcase to ensure we're not using the summary if we don't need it
With deltas outside the summary, if a commit is specified when pulling we don't download the summary. Verify this.
This commit is contained in:
parent
125ed2b199
commit
bc924ff870
|
|
@ -55,10 +55,10 @@ function verify_initial_contents() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if has_gpgme; then
|
if has_gpgme; then
|
||||||
echo "1..35"
|
echo "1..36"
|
||||||
else
|
else
|
||||||
# 3 tests needs GPG support
|
# 3 tests needs GPG support
|
||||||
echo "1..32"
|
echo "1..33"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try both syntaxes
|
# Try both syntaxes
|
||||||
|
|
@ -381,6 +381,25 @@ assert_file_has_content err.txt "Upgrade.*is chronologically older"
|
||||||
${CMD_PREFIX} ostree --repo=repo pull --timestamp-check-from-rev=${oldrev} origin main@${middlerev}
|
${CMD_PREFIX} ostree --repo=repo pull --timestamp-check-from-rev=${oldrev} origin main@${middlerev}
|
||||||
echo "ok pull timestamp checking"
|
echo "ok pull timestamp checking"
|
||||||
|
|
||||||
|
# test pull without override commit use summary, but with doesn't use summary
|
||||||
|
# We temporarily replace summary with broken one to detect if it is used
|
||||||
|
mv ostree-srv/gnomerepo/summary ostree-srv/gnomerepo/summary.backup
|
||||||
|
echo "broken" > ostree-srv/gnomerepo/summary
|
||||||
|
|
||||||
|
repo_init --no-sign-verify
|
||||||
|
rev=$(ostree --repo=ostree-srv/gnomerepo rev-parse main)
|
||||||
|
# This will need summary, so will fail
|
||||||
|
if ${CMD_PREFIX} ostree --repo=repo -v pull origin main; then
|
||||||
|
assert_not_reached "Should have failed with broken summary"
|
||||||
|
fi
|
||||||
|
# This won't need summary so will not fail
|
||||||
|
${CMD_PREFIX} ostree --repo=repo pull origin main@${rev}
|
||||||
|
|
||||||
|
# Restore summary
|
||||||
|
mv ostree-srv/gnomerepo/summary.backup ostree-srv/gnomerepo/summary
|
||||||
|
|
||||||
|
echo "ok pull with override id doesn't use summary"
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
repo_init --no-sign-verify
|
repo_init --no-sign-verify
|
||||||
${CMD_PREFIX} ostree --repo=repo pull origin main
|
${CMD_PREFIX} ostree --repo=repo pull origin main
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue