Parcourir la source

cleanup, thanks to donkult for his feedback

Michael Vogt il y a 14 ans
Parent
commit
3ce22d4f71

+ 3 - 6
test/integration/framework

@@ -687,14 +687,11 @@ signreleasefiles() {
 	msgdone "info"
 }
 
-simulatebrokenwebserver() {
-	if ! test -x ${BUILDDIRECTORY}/aptwebserver; then
-                 msgdie 'Need the aptwebserver to simulate broken connections'
+changetowebserver() {
+        if [ -n "$1" ] && ! test -x ${BUILDDIRECTORY}/aptwebserver; then
+            msgdie 'Need the aptwebserver when passing arguments'
         fi
-        changetowebserver '--simulate-paywall'
-}
 
-changetowebserver() {
 	if test -x ${BUILDDIRECTORY}/aptwebserver; then
 		cd aptarchive
 		LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/aptwebserver $@ 2> /dev/null > /dev/null &

+ 1 - 1
test/integration/test-ubuntu-bug346386

@@ -10,7 +10,7 @@ configarchitecture 'amd64'
 buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
 
 setupaptarchive
-simulatebrokenwebserver
+changetowebserver --simulate-paywall
 
 rm -rf rootdir/var/lib/apt/lists
 aptget update 

+ 1 - 1
test/interactive-helper/aptwebserver.cc

@@ -154,7 +154,7 @@ int main(int argc, const char *argv[])
    };
 
    CommandLine CmdL(Args, _config);
-   if(pkgInitConfig(*_config) == false || CmdL.Parse(argc,argv) == false) {
+   if(CmdL.Parse(argc,argv) == false) {
       _error->DumpErrors();
       exit(1);
    }