Commit 56f4748a authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

create our generate_port method

refactoring in RT::Test was lost somewhere
parent 6f2516f7
......@@ -53,7 +53,7 @@ my %ldap;
sub bootstrap_ldap_server {
my $self = shift;
my $port = RT::Test->generate_port;
my $port = $self->generate_port;
require Net::LDAP::Server::Test;
my $server = Net::LDAP::Server::Test->new( $port, auto_schema => 1 );
......@@ -97,6 +97,10 @@ sub bootstrap_ldap_basics {
return ($server, $client);
}
sub generate_port {
return 1024 + int rand(10000) + $$ % 1024;
}
sub add_ldap_user {
my $self = shift;
my %args = @_;
......
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