]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 17 Oct 2008 12:17:45 +0000 (01:17 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 17 Oct 2008 12:17:45 +0000 (01:17 +1300)
Bug 2489: Testsuite doesn't obey authentication scheme ./configure parameters

I've added a couple of AC_DEFINEs and a couple of #ifdefs to make the
offending tests conditional on the actually-built builtin auth-methods.

1  2 
configure.in
src/tests/testAuth.cc
src/tests/testAuth.h

diff --cc configure.in
Simple merge
index 9cfd4fbd2a55f9eea067f238e9a0df563a0e93d8,b2a9623c928b1bd707be0bc3c50c24321454a8db..40b20155a645ffcd9cb45b5d01e39d6ab773fad6
@@@ -116,13 -125,21 +125,21 @@@ fake_auth_setup(
      }
  
      params[]={ {"digest", digest_parms, 2},
 -               {"basic", basic_parms, 2},
 -               {"ntlm", ntlm_parms, 1},
 -               {"negotiate", negotiate_parms, 1}
 -             };
 +        {"basic", basic_parms, 2},
 +        {"ntlm", ntlm_parms, 1},
 +        {"negotiate", negotiate_parms, 1}
 +    };
  
-     for (unsigned scheme=0; scheme < 4; scheme++)
-         setup_scheme(getConfig(params[scheme].name), params[scheme].params, params[scheme].paramlength);
+     for (unsigned scheme=0; scheme < 4; scheme++) {
+         AuthConfig *schemeConfig;
+         schemeConfig = getConfig(params[scheme].name);
+         if (schemeConfig != NULL)
+             setup_scheme (schemeConfig, params[scheme].params, 
+                 params[scheme].paramlength);
+               else
+             fprintf(stderr,"Skipping unknown authentication scheme '%s'.\n", 
+                 params[scheme].name);
+     }
  
      authenticateInit(&config);
  
index c59b09fde2115adb2092fbb18764f9c499dbbac9,7fa7ce5c88129f60f6829d42daa9a68f7d007c88..b1704aa0cab801730ee0089c8e2a906b4c8c79ab
@@@ -2,8 -2,9 +2,10 @@@
  #ifndef SQUID_SRC_TEST_AUTH_H
  #define SQUID_SRC_TEST_AUTH_H
  
 -#include <cppunit/extensions/HelperMacros.h>
+ #include "config.h"
 +#include <cppunit/extensions/HelperMacros.h>
 +
  /*
   * test the auth Config framework
   */