Commit 38365b94 authored by Xavier Guimard's avatar Xavier Guimard

Add DBI in e2e-tests

parent 11977f19
......@@ -401,13 +401,21 @@ e2e-tests/conf/apache2.pid: start_web_server
start_web_server: all prepare_test_server
# Clean old server if launched
@if test "$(TESTBACKEND)" = "DBI"; then \
if test "$(TESTBACKEND)" = "DBI"; then \
echo 'create table lmConfig (cfgNum int, data text);'|sqlite3 e2e-tests/conf/config.db; \
echo 'create table sessions (id text, a_session text, LastUpdated int);'|sqlite3 e2e-tests/conf/sessions.db; \
perl -Ilemonldap-ng-common/blib/lib ./lemonldap-ng-common/scripts/convertConfig \
--current=e2e-tests/conf/lemonldap-ng.ini \
--new=e2e-tests/conf/lemonldap-ng-sql.ini; \
mv e2e-tests/conf/lemonldap-ng-sql.ini e2e-tests/conf/lemonldap-ng.ini; \
LLNG_DEFAULTCONFFILE=e2e-tests/conf/lemonldap-ng.ini \
perl -Ilemonldap-ng-common/blib/lib -Ilemonldap-ng-manager/blib/lib -Ilemonldap-ng-handler/blib/lib \
lemonldap-ng-common/scripts/lemonldap-ng-cli --yes 1 \
set globalStorage Apache::Session::SQLite3; \
LLNG_DEFAULTCONFFILE=e2e-tests/conf/lemonldap-ng.ini \
perl -Ilemonldap-ng-common/blib/lib -Ilemonldap-ng-manager/blib/lib -Ilemonldap-ng-handler/blib/lib \
lemonldap-ng-common/scripts/lemonldap-ng-cli --yes 1 \
addKey globalStorageOptions DataSource 'dbi:SQLite:dbname='`pwd`'/e2e-tests/conf/sessions.db'; \
fi
-@[ -e e2e-tests/conf/apache2.pid ] && kill `cat e2e-tests/conf/apache2.pid` || true
-@[ -e e2e-tests/conf/nginx.pid ] && kill `cat e2e-tests/conf/nginx.pid` || true
......
[all]
logLevel = debug
;globalStorage = Apache::Session::SQLite3
;globalStorageOptions = { DataSource => 'dbi:SQLite:dbname=__pwd__/e2e-tests/conf/sessions.db' }
[configuration]
type=CDBI
dbiChain = dbi:SQLite:dbname=__pwd__/e2e-tests/conf/config.db
[portal]
notification = 0
checkXSS = 0
portalSkin = bootstrap
staticPrefix = /static
languages = fr, en
templateDir = __pwd__/lemonldap-ng-portal/site/templates
;u2fActivation = 1
;u2fSelfRegistration = 1
[handler]
https = 0
status = 1
useRedirectOnError = 0
[manager]
protection = manager
staticPrefix = /static
languages = fr, en
templateDir = __pwd__/lemonldap-ng-manager/site/templates
[node-handler]
nodeVhosts = test2.example.com
......@@ -39,5 +39,6 @@ staticPrefix = /static
languages = fr, en
templateDir = __pwd__/lemonldap-ng-manager/site/templates
[apply]
[node-handler]
nodeVhosts = test2.example.com
......@@ -36,7 +36,7 @@ sub populate {
$self = $self->$backend(@_);
}
if ( $backend =~
/^Apache::Session::(?:(?:Postgre|Redi)s|(?:Oracl|Sybas)e|(?:My|No)SQL|F(?:ile|lex)|Cassandra|LDAP)/
/^Apache::Session::(?:(?:Postgre|Redi)s|S(?:QLite3|ybase)|(?:My|No)SQL|F(?:ile|lex)|Cassandra|Oracle|LDAP)/
and !$self->{args}->{useStorable} )
{
$self->{serialize} =
......
......@@ -24,7 +24,7 @@ $action ||= "help";
if ( $action =~ /^(?:[gs]et|(?:add|del)Key)$/ ) {
eval { require Lemonldap::NG::Manager::Cli; };
die 'Manager libraries not available, aborting' if ($@);
die "Manager libraries not available, aborting ($@)" if ($@);
Lemonldap::NG::Manager::Cli->run(@ARGV);
}
elsif ( $action =~ /^(?:info|update-cache)$/ ) {
......
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