#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable'
+msgmsg 'default setup'
setupaptarchive
aptgetupdate() {
$DOWNLOG
Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated
+msgmsg 'sources marked trusted=no'
sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=no] #' $DEBFILE
aptgetupdate 'testsuccess'
configarchitecture 'i386'
find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
+msgmsg 'unsigned repo'
sed -i -e 's#\(deb\(-src\)\?\) \[trusted=no\] #\1 #' $DEBFILE
aptgetupdate
$DOWNLOG
Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated
+msgmsg 'sources marked trusted=yes'
sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=yes] #' $DEBFILE
-aptgetupdate
+aptgetupdate 'testsuccess'
testsuccessequal "$PKGTEXT
$DOWNLOG