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;
|
|
|
|
|
2020-02-20 23:34:02 +01:00
|
|
|
my $client = LLNG::Manager::Test->new( {
|
2019-09-02 21:27:49 +02:00
|
|
|
ini => {
|
2019-09-02 23:18:25 +02:00
|
|
|
logLevel => 'error',
|
|
|
|
useSafeJail => 1,
|
|
|
|
globalStorage => 'Apache::Session::Timeout',
|
2019-09-02 21:27:49 +02:00
|
|
|
globalStorageOptions => {
|
2019-09-02 23:18:25 +02:00
|
|
|
Directory => 't/sessions',
|
2019-09-02 21:27:49 +02:00
|
|
|
LockDirectory => 't/sessions/lock',
|
2019-09-02 23:18:25 +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:18:25 +02:00
|
|
|
expectReject( $res, 401, 8 );
|
2019-09-02 21:27:49 +02:00
|
|
|
|
|
|
|
clean_sessions();
|
|
|
|
|
|
|
|
done_testing( count() );
|