Commit e39f6729 authored by Maxime Besson's avatar Maxime Besson

Fix unit test for #321 with old perl

parent 22a58a6f
......@@ -36,10 +36,14 @@ ok( $res = $client->_get( '/', undef, undef, "lemonldap=$sessionId" ),
ok( $res->[0] == 200, 'Code is 200' ) or explain( $res, 200 );
count(2);
ok( $res = $client->_get( '/user_dwho/', undef, undef, "lemonldap=$sessionId" ),
'Regexp query' );
ok( $res->[0] == 200, 'Code is 200' ) or explain( $res, 200 );
count(2);
SKIP: {
skip "Regexp match in rules only supported in recent Perl", 0 unless $^V ge v5.25.7;
ok( $res = $client->_get( '/user_dwho/', undef, undef, "lemonldap=$sessionId" ),
'Regexp query' );
ok( $res->[0] == 200, 'Code is 200' ) or explain( $res, 200 );
count(2);
};
# Request an URI protected by custom function -> allowed
ok(
......@@ -92,11 +96,14 @@ ok( $res = $client->_get( '/AuthWeak', undef, undef, "lemonldap=$sessionId" ),
ok( $res->[0] == 200, 'Code is 200' ) or explain( $res, 200 );
count(2);
ok( $res = $client->_get( '/user_rtyler/', undef, undef, "lemonldap=$sessionId" ),
'Regexp deny query' );
ok( $res->[0] == 403, 'Code is 403' ) or explain( $res, 403 );
SKIP: {
skip "Regexp match in rules only supported in recent Perl", 0 unless $^V ge v5.25.7;
ok( $res = $client->_get( '/user_rtyler/', undef, undef, "lemonldap=$sessionId" ),
'Regexp deny query' );
ok( $res->[0] == 403, 'Code is 403' ) or explain( $res, 403 );
count(2);
}
count(2);
# Required AuthnLevel = 5
ok(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment