Commit 85c90eab authored by Xavier Guimard's avatar Xavier Guimard

Avoid writing in /tmp during build (#LEMONDAP-1323)

parent a09af344
......@@ -19,7 +19,8 @@ sub newSession {
{
storageModule => 'Apache::Session::File',
storageModuleOptions => {
Directory => 't/sessions',
Directory => 't/sessions',
LockDirectory => 't/sessions',
generateModule =>
'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
},
......@@ -127,7 +128,7 @@ $res = &client->jsonResponse( '/sessions/global', 'orderBy=uid' );
ok( $res->{values}->[0]->{uid} eq 'dwho', '1st user is dwho' );
ok( $res->{values}->[1]->{uid} eq 'dwho2', '2nd user is dwho2' );
ok( $res->{values}->[2]->{uid} eq 'foo', '3rd user is foo' );
ok( $res->{values}->[3]->{uid} eq 'foo', '4rd user is foo' );
ok( $res->{values}->[3]->{uid} eq 'foo', '4th user is foo' );
count(4);
# IPv4 networks
......@@ -145,7 +146,7 @@ ok( $res->{count} == 4, '4 sessions ordered' );
ok( $res->{values}->[0]->{session} eq $ids[1], '1st is id[1]' );
ok( $res->{values}->[1]->{session} eq $ids[2], '2nd is id[2]' );
ok( $res->{values}->[2]->{session} eq $ids[3], '3rd is id[3]' );
ok( $res->{values}->[3]->{session} eq $ids[0], '4rd is id[0]' );
ok( $res->{values}->[3]->{session} eq $ids[0], '4th is id[0]' );
count(5);
#print STDERR Dumper($res);
......@@ -161,7 +162,7 @@ foreach (@ids) {
}
opendir D, 't/sessions' or die 'Unknown dir';
my @files = grep { not /^\./ } readdir D;
my @files = grep { not /(?:^\.|.lock$)/ } readdir D;
ok( @files == 0, "Session directory is empty" );
count(1);
......
......@@ -109,6 +109,7 @@
"globalStorage": "Apache::Session::File",
"globalStorageOptions": {
"Directory": "t/sessions",
"LockDirectory": "t/sessions",
"generateModule": "Lemonldap::NG::Common::Apache::Session::Generate::SHA256"
},
"groups": {},
......@@ -139,7 +140,8 @@
"passwordDB": "Demo",
"persistentStorage": "Apache::Session::File",
"persistentStorageOptions": {
"Directory": "__PSESSIONDIR__"
"Directory": "t/sessions",
"LockDirectory": "t/sessions"
},
"portal": "http://auth.example.com/",
"reloadUrls": {},
......
[all]
logLevel = error
logLevel = error
localSessionStorage =
localSessionStorageOptions =
[configuration]
......
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