ADD: more tests
This commit is contained in:
parent
5c8a8b4943
commit
bc4433b429
@ -34,12 +34,10 @@ sub init {
|
||||
sub createDSN
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
my $dsn = "dbi:MariaDB(RaiseError=>0):database=" . $self->{database} . ";host=" . $self->{host} . ";port=" . $self->{port};
|
||||
#my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
|
||||
my $dsn = "DBI:mariadb:database=" . $self->{database} . ";host=" . $self->{host} . ";port=" . $self->{port};
|
||||
$self->{dsn} = $dsn;
|
||||
|
||||
$self->log(LOGDEBUG, "created DSN " . $self->{dsn});
|
||||
|
||||
# try to parse the dsn to ensure it is valid
|
||||
my @data = DBI->parse_dsn($self->{dsn});
|
||||
|
||||
@ -49,6 +47,7 @@ sub createDSN
|
||||
$self->{dsn}="";
|
||||
}
|
||||
|
||||
$self->log(LOGDEBUG, "created DSN " . $self->{dsn});
|
||||
}
|
||||
|
||||
sub createQuery
|
||||
@ -197,7 +196,6 @@ sub askDatabase
|
||||
}
|
||||
|
||||
my $dsn = $self->{dsn};
|
||||
|
||||
my $dbh = DBI::connect($dsn, $self->{user}, $self->{pass},{ RaiseError => 1, PrintError => 0 });
|
||||
|
||||
if ($dbh->err())
|
||||
|
@ -55,6 +55,8 @@
|
||||
605 rcpt_ok rok rcpok
|
||||
608 bogus_bounce bog bogus check_bogus_bounce
|
||||
609 greylisting gry greyl
|
||||
610 rcpt_mysql rmy rcmys
|
||||
|
||||
#
|
||||
# Content Filters
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user