mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-20 18:09:21 +03:00
pull-test: Add some 404 tests
See: https://github.com/flatpak/flatpak/issues/816 Closes: #887 Approved by: jlebon
This commit is contained in:
parent
07acb5b82c
commit
ad119aece9
@ -35,7 +35,7 @@ function verify_initial_contents() {
|
|||||||
assert_file_has_content baz/cow '^moo$'
|
assert_file_has_content baz/cow '^moo$'
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "1..18"
|
echo "1..20"
|
||||||
|
|
||||||
# Try both syntaxes
|
# Try both syntaxes
|
||||||
repo_init --no-gpg-verify
|
repo_init --no-gpg-verify
|
||||||
@ -295,6 +295,23 @@ assert_file_has_content err.txt "ONE BILLION DOLLARS"
|
|||||||
|
|
||||||
echo "ok unconfigured"
|
echo "ok unconfigured"
|
||||||
|
|
||||||
|
cd ${test_tmpdir}
|
||||||
|
repo_init
|
||||||
|
${CMD_PREFIX} ostree --repo=repo remote add origin-bad $(cat httpd-address)/ostree/noent
|
||||||
|
if ${CMD_PREFIX} ostree --repo=repo --depth=0 pull origin-bad main 2>err.txt; then
|
||||||
|
assert_not_reached "pull repo 404 succeeded?"
|
||||||
|
fi
|
||||||
|
assert_file_has_content err.txt "404"
|
||||||
|
echo "ok pull repo 404"
|
||||||
|
|
||||||
|
cd ${test_tmpdir}
|
||||||
|
repo_init --set=gpg-verify=true
|
||||||
|
if ${CMD_PREFIX} ostree --repo=repo --depth=0 pull origin main 2>err.txt; then
|
||||||
|
assert_not_reached "pull repo 404 succeeded?"
|
||||||
|
fi
|
||||||
|
assert_file_has_content err.txt "GPG verification enabled, but no signatures found"
|
||||||
|
echo "ok pull repo 404 (gpg)"
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
repo_init --set=gpg-verify=true
|
repo_init --set=gpg-verify=true
|
||||||
${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo commit \
|
${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo commit \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user