use FILTER enviroment variable to specify LDAP filter
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 4 Oct 2016 12:02:21 +0000 (14:02 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 4 Oct 2016 12:02:21 +0000 (14:02 +0200)
t/ldap-rewrite.t

index 3b8a3ff..070c64b 100755 (executable)
@@ -24,6 +24,8 @@ ok( my $ldap = Net::LDAP->new( $config->{server} ), 'new Net::LDAP ' . dump( $co
 ok( my $bind = $ldap->bind( $config->{bind_as}, password => $config->{password} ), 'bind ' . $config->{bind_as} );
 ldap_check_error $bind;
 
+$config->{search}->{filter} = $ENV{FILTER} if $ENV{FILTER};
+
 ok( my $search = $ldap->search( %{ $config->{search} } ), 'search ' . dump( $config->{search} ) );
 ldap_check_error $search;