msgdone "info"
}
+simulatebrokenwebserver() {
+ if ! test -x ${BUILDDIRECTORY}/aptwebserver; then
+ msgdie 'Need the aptwebserver to simulate broken connections'
+ fi
+ changetowebserver '--simulate-paywall'
+}
+
changetowebserver() {
if test -x ${BUILDDIRECTORY}/aptwebserver; then
cd aptarchive
- LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/aptwebserver 2> /dev/null > /dev/null &
+ LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/aptwebserver $@ 2> /dev/null > /dev/null &
addtrap "kill $!;"
cd - > /dev/null
elif which weborf > /dev/null; then
--- /dev/null
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
+
+setupaptarchive
+simulatebrokenwebserver
+
+rm -rf rootdir/var/lib/apt/lists
+aptget update
+testequal 'partial' "$(ls rootdir/var/lib/apt/lists/)"
+
+
}
_error->DumpErrors(std::cerr);
messages.clear();
- }
- std::clog << "CLOSE client " << client
- << " on socket " << sock << std::endl;
- close(client);
+ std::clog << "CLOSE client " << client
+ << " on socket " << sock << std::endl;
+ close(client);
+ }
}
return 0;
}