You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2019/03/05 07:29:05 UTC

svn commit: r1854814 - in /spamassassin: branches/3.4/t/urilocalbl_geoip.t trunk/t/urilocalbl.t

Author: gbechis
Date: Tue Mar  5 07:29:05 2019
New Revision: 1854814

URL: http://svn.apache.org/viewvc?rev=1854814&view=rev
Log:
Net::CIDR::Lite is needed to run urilocalbl code

Modified:
    spamassassin/branches/3.4/t/urilocalbl_geoip.t
    spamassassin/trunk/t/urilocalbl.t

Modified: spamassassin/branches/3.4/t/urilocalbl_geoip.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/urilocalbl_geoip.t?rev=1854814&r1=1854813&r2=1854814&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/urilocalbl_geoip.t (original)
+++ spamassassin/branches/3.4/t/urilocalbl_geoip.t Tue Mar  5 07:29:05 2019
@@ -14,11 +14,13 @@ BEGIN {
 use lib '.'; use lib 't';
 use SATest; sa_t_init("urilocalbl");
 
+use constant HAS_CIDR_LITE => eval { require Net::CIDR::Lite; };
 use constant HAS_GEOIP => eval { require Geo::IP; };
 use constant HAS_GEOIP_CONF => eval { Geo::IP->new(GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE); };
 
 use Test::More;
 
+plan skip_all => "Net::CIDR::Lite not installed" unless HAS_CIDR_LITE;
 plan skip_all => "Geo::IP not installed" unless HAS_GEOIP;
 plan skip_all => "Geo::IP not configured" unless HAS_GEOIP_CONF;
 plan tests => 3;

Modified: spamassassin/trunk/t/urilocalbl.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/urilocalbl.t?rev=1854814&r1=1854813&r2=1854814&view=diff
==============================================================================
--- spamassassin/trunk/t/urilocalbl.t (original)
+++ spamassassin/trunk/t/urilocalbl.t Tue Mar  5 07:29:05 2019
@@ -15,6 +15,7 @@ use lib '.'; use lib 't';
 use SATest; sa_t_init("urilocalbl");
 
 $tests = 0;
+use constant HAS_CIDR_LITE => eval { require Net::CIDR::Lite; };
 eval { require GeoIP2::Database::Reader; $tests += 8; $has{GEOIP2}  = 1 };
 eval { require Geo::IP;                  $tests += 8; $has{GEOIP}   = 1 };
 eval { require IP::Country::DB_File;     $tests += 8; $has{DB_FILE} = 1 };
@@ -22,6 +23,7 @@ eval { require IP::Country::Fast;
 
 use Test::More;
 
+plan skip_all => "Net::CIDR::Lite not installed" unless HAS_CIDR_LITE;
 plan skip_all => "No supported GeoDB module installed" unless $tests;
 
 $net = conf_bool('run_net_tests');