test: Improve pull corruption test
To verify pull with a second repo works.
This commit is contained in:
parent
bb8418ff01
commit
902848cd71
|
|
@ -39,6 +39,11 @@ do_corrupt_pull_test() {
|
|||
fi
|
||||
rm -rf ${repopath}
|
||||
cp -a ${repopath}.orig ${repopath}
|
||||
if ${CMD_PREFIX} ostree --repo=repo pull origin main && ${CMD_PREFIX} ostree --repo=repo fsck; then
|
||||
echo "ok pull with correct data worked"
|
||||
else
|
||||
assert_not_reached "pull with correct data failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
# Corrupt .dirmeta
|
||||
|
|
@ -55,6 +60,7 @@ echo "ok corrupt dirtree"
|
|||
|
||||
# Corrupt .filez
|
||||
someobject=$(find ${repopath} -name '*.filez' | head -1)
|
||||
echo "garbage garbage garbage" > ${someobject}
|
||||
otherobject=$(find ${repopath} -name '*.filez' | head -2 | tail -1)
|
||||
cp ${someobject} ${otherobject}
|
||||
do_corrupt_pull_test
|
||||
echo "ok corrupt filez"
|
||||
|
|
|
|||
Loading…
Reference in New Issue