Remove extras tests not needed now

This commit is contained in:
Xavier Guimard 2016-06-09 11:17:14 +00:00
parent b54eb703e6
commit c725ef2ef1
3 changed files with 1 additions and 108 deletions

View File

@ -336,7 +336,7 @@ manager: manager_conf handler
# Test targets
# ------------
test: all common_test handler_test portal_test manager_test extra_test
test: all common_test handler_test portal_test manager_test
common_test: common
@$(MAKE) -C ${SRCCOMMONDIR} test
@ -350,10 +350,6 @@ portal_test: portal
manager_test: manager
@$(MAKE) -C ${SRCMANAGERDIR} test FULLPERL="$(PERL) -I../${SRCCOMMONDIR}/blib/lib/ -I../${SRCHANDLERDIR}/blib/lib/"
extra_test: all
cd ${SRCPORTALDIR} && prove -b -I ../$(SRCCOMMONDIR)/blib/lib -I ../$(SRCHANDLERDIR)/blib/lib -I../${SRCPORTALDIR}/blib/lib/ xt
# PERL_DL_NONLAZY=1 $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness(0, 'lemonldap-ng-common/blib/lib', 'lemonldap-ng-handler/blib/lib', 'lemonldap-ng-manager/blib/lib', 'lemonldap-ng-portal/blib/lib')" extra-tests/*.t
# End-to-end tests
# ----------------

View File

@ -1,50 +0,0 @@
use strict;
use Test::More tests => 6;
SKIP: {
eval 'use Lemonldap::NG::Handler::Status';
if ($@) {
skip 'Lemonldap::NG::Handler::Status not available', 6;
}
else {
use_ok('Lemonldap::NG::Portal::Simple');
ok( open( F, $INC{'Lemonldap/NG/Portal/Simple.pm'} ) );
my ( %h1, %h2, @missingInStatus, @differentValues );
# Load constants
while (<F>) {
$h1{$1} = $2 if (/^\s*PE_(\w+)\s*=>\s*(-?\d+),$/);
last if (/^sub/);
}
close F;
ok( open( F, $INC{'Lemonldap/NG/Handler/Status.pm'} ) );
while (<F>) {
$h2{$2} = $1 if (/^\s*(-?\d+)\s*=>\s*'PORTAL_(\w+)',$/);
}
foreach my $k ( sort keys %h1 ) {
if ( defined( $h2{$k} ) ) {
unless ( $h1{$k} == $h2{$k} ) {
push @differentValues, $k;
}
delete $h2{$k};
}
else {
push @missingInStatus, $k;
}
delete $h1{$k};
}
ok( !@differentValues,
'Search different constant values between Status.pm and portal' );
ok(
!@missingInStatus,
join( ', ',
'Search missing constants in Status.pm',
@missingInStatus )
);
ok( !( keys %h2 ), 'Constants set in Status.pm and not in portal' );
}
}

View File

@ -1,53 +0,0 @@
#!/usr/bin/perl
use Test::More tests => 1;
use Lemonldap::NG::Portal;
SKIP: {
my $p;
eval 'use Test::Weaken qw(leaks)';
if ($@) {
skip 'Test::Weaken is not available', 1;
}
else {
my $tester = Test::Weaken::leaks(
{
constructor => sub {
Lemonldap::NG::Portal::Simple->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'LDAP test=1',
userDB => 'LDAP test=1',
passwordDB => 'LDAP test=1',
user => '',
password => '',
}
);
},
destructor => sub {
my $p = shift;
undef $p;
undef $Lemonldap::NG::Portal::SharedConf::confCached;
},
}
);
if ($tester) {
my $unfreed_proberefs = $tester->unfreed_proberefs();
my $unfreed_count = @{$unfreed_proberefs};
printf STDERR
"Test 2: %d of %d original references were not freed\n",
$tester->unfreed_count(), $tester->probe_count();
print STDERR
"These are the probe references to the unfreed objects:\n";
require Data::Dumper;
for my $ix ( 0 .. $#{$unfreed_proberefs} ) {
print STDERR Data::Dumper->Dump( [ $unfreed_proberefs->[$ix] ],
["unfreed_$ix"] );
}
}
ok( !$tester );
}
}
done_testing;