Append unit test (#2657)
This commit is contained in:
parent
5ffd909d7d
commit
adc96ee774
|
@ -9,10 +9,12 @@ require 't/test-lib.pm';
|
|||
my $res;
|
||||
my $client = LLNG::Manager::Test->new( {
|
||||
ini => {
|
||||
logLevel => 'error',
|
||||
passwordDB => 'Demo',
|
||||
impersonationRule => 1,
|
||||
customPlugins => 't::AfterDataCustomPlugin',
|
||||
logLevel => 'debug',
|
||||
passwordDB => 'Demo',
|
||||
impersonationRule => 1,
|
||||
customFunctions => 'My::accesToTrace My::return0,, My::return1 ',
|
||||
customPlugins =>
|
||||
't::AfterDataCustomPlugin t::CasHookPlugin,, t::OidcHookPlugin ',
|
||||
customPluginsParams => { uid => 'rtyler' }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package My;
|
||||
|
||||
sub accessToTrace {
|
||||
my $hash = shift;
|
||||
my $custom = $hash->{custom};
|
||||
my $req = $hash->{req};
|
||||
my $vhost = $hash->{vhost};
|
||||
my $params = $hash->{params};
|
||||
my $session = $hash->{session};
|
||||
|
||||
return
|
||||
"$custom alias $params->[0]_$params->[1]:$session->{groups} by using $session->{ $params->[2] }";
|
||||
}
|
||||
|
||||
sub return0 {
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub return1 {
|
||||
return 1;
|
||||
}
|
||||
|
||||
1;
|
Loading…
Reference in New Issue