Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (20 sloc) 576 Bytes
#!perl -w
use strict;
use warnings;
use Qpsmtpd::Constants;
sub register_tests {
my $self = shift;
eval 'use Geo::IP';
if ( $@ ) {
warn "could not load Geo::IP\n";
$self->log(LOGERROR, "could not load Geo::IP");
$self->register_test('test_geoip_lookup', 2);
sub test_geoip_lookup {
my $self = shift;
cmp_ok( $self->connect_handler(), '==', DECLINED, "exit code");
cmp_ok( $self->qp->connection->notes('geoip_country'), 'eq', 'US', "note");
Jump to Line
Something went wrong with that request. Please try again.