Fix unit tests (#1605)

This commit is contained in:
Christophe Maudoux 2020-01-10 23:07:21 +01:00
parent aab0dcca14
commit 50316f2e50
2 changed files with 7 additions and 2 deletions

View File

@ -358,7 +358,7 @@ lkRrWfQftwmLyNIu3HfSgXlgAZS30ymfbzBU
$trmsg = $trmsg[0]; # get the first one only
$trmsg =~ s/.*trmsg="([0-9]+)".*/$1/g; # get error code number
ok( $trmsg == PE_RESETCERTIFICATE_INVALID, 'Invalid certificate' );
}
count($maintests);
done_testing( count() );

View File

@ -5,6 +5,11 @@ use strict;
use IO::String;
use File::Copy;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_RESETCERTIFICATE_INVALID PE_RESETCERTIFICATE_FORMEMPTY
PE_RESETCERTIFICATE_FIRSTACCESS
);
BEGIN {
eval {
require 't/test-lib.pm';
@ -358,8 +363,8 @@ lkRrWfQftwmLyNIu3HfSgXlgAZS30ymfbzBU
$trmsg = $trmsg[0]; # get the first one only
$trmsg =~ s/.*trmsg="([0-9]+)".*/$1/g; # get error code number
ok( $trmsg == PE_RESETCERTIFICATE_INVALID, 'Invalid certificate' );
}
count($maintests);
stopLdapServer() if $ENV{LLNGTESTLDAP};
done_testing( count() );