2016-06-07 23:04:24 +02:00
|
|
|
use Test::More;
|
|
|
|
use strict;
|
|
|
|
use IO::String;
|
|
|
|
|
|
|
|
my $res;
|
2018-02-08 21:55:21 +01:00
|
|
|
my $maintests = 2;
|
2016-12-23 11:02:21 +01:00
|
|
|
require 't/test-lib.pm';
|
2016-06-07 23:04:24 +02:00
|
|
|
|
|
|
|
SKIP: {
|
2018-02-08 21:55:21 +01:00
|
|
|
skip 'REMOTELLNG is not set', $maintests unless ( $ENV{REMOTELLNG} );
|
2016-11-14 13:34:46 +01:00
|
|
|
my $client = LLNG::Manager::Test->new(
|
2016-06-07 23:04:24 +02:00
|
|
|
{
|
2016-11-14 13:34:46 +01:00
|
|
|
ini => {
|
|
|
|
logLevel => 'error',
|
|
|
|
useSafeJail => 1,
|
|
|
|
authentication => 'Proxy',
|
2017-02-05 10:13:20 +01:00
|
|
|
userDB => 'Same',
|
2016-11-14 13:34:46 +01:00
|
|
|
soapAuthService => $ENV{REMOTELLNG},
|
|
|
|
}
|
2016-06-07 23:04:24 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
ok(
|
2016-11-14 13:34:46 +01:00
|
|
|
$res = $client->_post(
|
2016-06-07 23:04:24 +02:00
|
|
|
'/',
|
|
|
|
IO::String->new('user=dwho&password=dwho'),
|
|
|
|
length => 23
|
|
|
|
),
|
|
|
|
'Auth query'
|
|
|
|
);
|
2016-12-23 11:02:21 +01:00
|
|
|
expectOK($res);
|
|
|
|
my $id = expectCookie($res);
|
2016-06-07 23:04:24 +02:00
|
|
|
|
2016-11-14 13:34:46 +01:00
|
|
|
$client->logout($id);
|
2016-06-07 23:04:24 +02:00
|
|
|
clean_sessions();
|
|
|
|
}
|
2018-02-08 21:55:21 +01:00
|
|
|
count($maintests);
|
2016-12-23 11:02:21 +01:00
|
|
|
done_testing( count() );
|