2019-09-02 21:27:49 +02:00
|
|
|
use Test::More;
|
|
|
|
use strict;
|
|
|
|
use IO::String;
|
|
|
|
use lib 't/lib';
|
|
|
|
|
|
|
|
require 't/test-lib.pm';
|
|
|
|
|
|
|
|
my $res;
|
|
|
|
|
|
|
|
my $client = LLNG::Manager::Test->new(
|
|
|
|
{
|
|
|
|
ini => {
|
2019-09-02 23:16:37 +02:00
|
|
|
logLevel => 'error',
|
|
|
|
useSafeJail => 1,
|
|
|
|
globalStorage => 'Apache::Session::Timeout',
|
2019-09-02 21:27:49 +02:00
|
|
|
globalStorageOptions => {
|
2019-09-02 23:16:37 +02:00
|
|
|
Directory => 't/sessions',
|
2019-09-02 21:27:49 +02:00
|
|
|
LockDirectory => 't/sessions/lock',
|
2019-09-02 23:16:37 +02:00
|
|
|
timeout => 1,
|
2019-09-02 21:27:49 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
# Try to authenticate with good password
|
|
|
|
# --------------------------------------
|
|
|
|
diag 'Waiting';
|
|
|
|
ok(
|
|
|
|
$res = $client->_post(
|
|
|
|
'/',
|
|
|
|
IO::String->new('user=dwho&password=dwho'),
|
|
|
|
length => 23,
|
|
|
|
),
|
|
|
|
'Auth query'
|
|
|
|
);
|
|
|
|
count(1);
|
2019-09-02 23:16:37 +02:00
|
|
|
expectReject( $res, 401, 8 );
|
2019-09-02 21:27:49 +02:00
|
|
|
|
|
|
|
clean_sessions();
|
|
|
|
|
|
|
|
done_testing( count() );
|