testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess aptget install old -s
testfailure aptget install new -s
testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess aptget install old -s
testfailure aptget install new -s
- testsuccess ls $ROOTDIR/var/lib/apt/lists/*_InRelease
- testfailure ls $ROOTDIR/var/lib/apt/lists/*_Release
+ testnotempty find "${ROOTDIR}/var/lib/apt/lists" -name '*_InRelease'
+ testempty find "${ROOTDIR}/var/lib/apt/lists" -name '*_Release'
testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess aptget install old -s
testfailure aptget install new -s
testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess aptget install old -s
testfailure aptget install new -s
- testsuccess ls $ROOTDIR/var/lib/apt/lists/*_InRelease
- testfailure ls $ROOTDIR/var/lib/apt/lists/*_Release
+ testnotempty find "${ROOTDIR}/var/lib/apt/lists" -name '*_InRelease'
+ testempty find "${ROOTDIR}/var/lib/apt/lists" -name '*_Release'
}
test_unauthenticated_to_invalid_inrelease() {
msgmsg 'Test UnAuthenticated to invalid InRelease reverts everything'
create_fresh_archive
}
test_unauthenticated_to_invalid_inrelease() {
msgmsg 'Test UnAuthenticated to invalid InRelease reverts everything'
create_fresh_archive
testwarning aptget update --allow-insecure-repositories
listcurrentlistsdirectory > lists.before
testfailureequal "WARNING: The following packages cannot be authenticated!
old
testwarning aptget update --allow-insecure-repositories
listcurrentlistsdirectory > lists.before
testfailureequal "WARNING: The following packages cannot be authenticated!
old
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfileequal lists.before "$(listcurrentlistsdirectory)"
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfileequal lists.before "$(listcurrentlistsdirectory)"
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfileequal lists.before "$(listcurrentlistsdirectory)"
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfileequal lists.before "$(listcurrentlistsdirectory)"
- echo "lala" >> $APTARCHIVE/dists/unstable/main/source/Sources.gz
- touch -d '+2min' $APTARCHIVE/dists/unstable/main/source/Sources.gz
+ echo "lala" >> "$APTARCHIVE/dists/unstable/main/source/Sources.gz"
+ touch -d '+2min' "$APTARCHIVE/dists/unstable/main/source/Sources.gz"
-APTARCHIVE=$(readlink -f ./aptarchive)
-ROOTDIR=${TMPWORKINGDIRECTORY}/rootdir
-APTARCHIVE_LISTS="$(echo $APTARCHIVE | tr "/" "_" )"
+APTARCHIVE="$(readlink -f ./aptarchive)"
+ROOTDIR="${TMPWORKINGDIRECTORY}/rootdir"
+APTARCHIVE_LISTS="$(echo "$APTARCHIVE" | tr "/" "_" )"