]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-ftparchive-by-hash
The entire concept of PendingError() is flawed :/.
[apt.git] / test / integration / test-apt-ftparchive-by-hash
index 6cda0e41515e339a07cec6edf58a2e589b4a1071..75fb0cf2cc5181bc36fb685529071c6fa8d82d8b 100755 (executable)
@@ -2,7 +2,7 @@
 set -e
 
 verify_by_hash() {
-    for hash_gen in SHA1:sha1sum SHA256:sha256sum SHA512:sha512sum; do
+    for hash_gen in SHA256:sha256sum SHA512:sha512sum; do
         hash=$(echo ${hash_gen} | cut -f1 -d:)
         gen=$(echo ${hash_gen} | cut -f2 -d:)
         testsuccess stat aptarchive/dists/unstable/main/binary-i386/by-hash/$hash/$($gen aptarchive/dists/unstable/main/binary-i386/Packages | cut -f1 -d' ')
@@ -13,11 +13,15 @@ verify_by_hash() {
 #
 # main()
 #
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 setupenvironment
 configarchitecture 'i386'
 configcompression 'gz' '.'
+confighashes 'SHA256' 'SHA512'
+
+# enable by-hash in apt-ftparchive
+echo 'APT::FTPArchive::DoByHash "1";' >> aptconfig.conf
 
 # build one pacakge
 buildsimplenativepackage 'foo' 'i386' '1' 'unstable'
@@ -42,7 +46,7 @@ verify_by_hash
 testsuccess stat aptarchive/dists/unstable/main/binary-i386/by-hash/SHA256/$previous_hash
 
 # ensure we have it in the Release file
-testsuccess grep "Acquire-By-Hash: true" aptarchive/dists/unstable/*Release
+testsuccess grep "Acquire-By-Hash: yes" aptarchive/dists/unstable/*Release
 
 # now ensure gc work
 for i in $(seq 3); do