Update e2e_tests
This commit is contained in:
parent
0e11cf3ed3
commit
0e5b06aec4
3
Makefile
3
Makefile
|
@ -296,7 +296,7 @@ e2e_test: all prepare_test_server start_web_server launch_protractor stop_web_se
|
|||
|
||||
prepare_test_server:
|
||||
@mkdir -p e2e-tests/conf/sessions/lock e2e-tests/conf/persistents/lock
|
||||
@$(MAKE) install_webserver_conf \
|
||||
@$(MAKE) install_webserver_conf install_test_site \
|
||||
RCONFDIR=e2e-tests/conf \
|
||||
ERASECONFIG=1 \
|
||||
VHOSTLISTEN='*:$(TESTWEBSERVERPORT)' \
|
||||
|
@ -304,6 +304,7 @@ prepare_test_server:
|
|||
PSGISERVERSOCKET=unix:`pwd`/e2e-tests/conf/llng.sock \
|
||||
PORTALDIR=`pwd`/$(SRCPORTALDIR)/example \
|
||||
MANAGERDIR=`pwd`/$(SRCMANAGERDIR)/site \
|
||||
TESTDIR=`pwd`/e2e-tests/conf/site \
|
||||
MANAGERPSGIDIR=`pwd`/e2e-tests \
|
||||
DEFDOCDIR=`pwd`/doc \
|
||||
FRDOCDIR=`pwd`/po-doc/fr
|
||||
|
|
|
@ -1,67 +1,27 @@
|
|||
server {
|
||||
listen __PORT__;
|
||||
server_name test1.__DNSDOMAIN__;
|
||||
server_name reload.__DNSDOMAIN__;
|
||||
root /var/www/html;
|
||||
|
||||
|
||||
# Internal authentication request
|
||||
location = /lmauth {
|
||||
internal;
|
||||
location = /reload {
|
||||
allow 127.0.0.1;
|
||||
deny all;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass __PSGISERVERSOCKET__;
|
||||
|
||||
# Drop post datas
|
||||
fastcgi_pass_request_body off;
|
||||
fastcgi_param CONTENT_LENGTH "";
|
||||
|
||||
# Keep original hostname
|
||||
fastcgi_param HOST $http_host;
|
||||
|
||||
# Keep original request (LLNG server will received /llauth)
|
||||
fastcgi_param X_ORIGINAL_URI $request_uri;
|
||||
|
||||
}
|
||||
|
||||
# Client requests
|
||||
location / {
|
||||
auth_request /lmauth;
|
||||
auth_request_set $lmremote_user $upstream_http_lm_remote_user;
|
||||
auth_request_set $lmlocation $upstream_http_location;
|
||||
error_page 401 $lmlocation;
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
# Add as many 3-lines block as headers returned by configuration for this
|
||||
# template
|
||||
auth_request_set $headername1 $upstream_http_headername1;
|
||||
auth_request_set $headervalue1 $upstream_http_headervalue1;
|
||||
#proxy_set_header $headername1 $headervalue1;
|
||||
# OR
|
||||
#fastcgi_param $fheadername1 $headervalue1;
|
||||
|
||||
auth_request_set $headername2 $upstream_http_headername2;
|
||||
auth_request_set $headervalue2 $upstream_http_headervalue2;
|
||||
#proxy_set_header $headername2 $headervalue2;
|
||||
# OR
|
||||
#fastcgi_param $fheadername2 $headervalue2;
|
||||
|
||||
auth_request_set $headername3 $upstream_http_headername3;
|
||||
auth_request_set $headervalue3 $upstream_http_headervalue3;
|
||||
#proxy_set_header $headername3 $headervalue3;
|
||||
# OR
|
||||
#fastcgi_param $fheadername3 $headervalue3;
|
||||
|
||||
auth_request_set $headername4 $upstream_http_headername4;
|
||||
auth_request_set $headervalue4 $upstream_http_headervalue4;
|
||||
#proxy_set_header $headername4 $headervalue4;
|
||||
# OR
|
||||
#fastcgi_param $fheadername4 $headervalue4;
|
||||
|
||||
|
||||
deny all;
|
||||
}
|
||||
|
||||
location = /lmstatus {
|
||||
fastcgi_pass __PSGISERVERSOCKET__;
|
||||
}
|
||||
# Uncomment this if status is enabled
|
||||
#location = /lmstatus {
|
||||
# allow 127.0.0.1;
|
||||
# deny all;
|
||||
# include /etc/nginx/fastcgi_params;
|
||||
# fastcgi_pass __PSGISERVERSOCKET__;
|
||||
#}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ FcgidIPCDir conf/
|
|||
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
|
||||
LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so
|
||||
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
|
||||
PerlPassEnv LLNG_DEFAULTCONFFILE
|
||||
Include conf/env.conf
|
||||
AddHandler fcgid-script .fcgi
|
||||
LoadModule filter_module /usr/lib/apache2/modules/mod_filter.so
|
||||
|
@ -53,5 +54,6 @@ AddLanguage fr .fr
|
|||
MaxConnectionsPerChild 0
|
||||
</IfModule>
|
||||
</IfVersion>
|
||||
IncludeOptional conf/manager-apache2.X.conf
|
||||
IncludeOptional conf/portal-apache2.X.conf
|
||||
Include conf/manager-apache2.X.conf
|
||||
Include conf/portal-apache2.X.conf
|
||||
Include conf/test-apache2.X.conf
|
||||
|
|
|
@ -30,10 +30,19 @@ my %builder = (
|
|||
require CGI::Compile;
|
||||
return CGI::Emulate::PSGI->handler(
|
||||
CGI::Compile->compile('lemonldap-ng-portal/example/index.pl') );
|
||||
}
|
||||
},
|
||||
test => sub {
|
||||
require CGI::Emulate::PSGI;
|
||||
require CGI::Compile;
|
||||
return CGI::Emulate::PSGI->handler(
|
||||
CGI::Compile->compile('e2e-tests/conf/site/index.pl') );
|
||||
},
|
||||
);
|
||||
|
||||
sub {
|
||||
if($_[0]->{HOST} =~ /^test/) {
|
||||
$type = 'test';
|
||||
}
|
||||
my $type = $_[0]->{LLTYPE} || 'handler';
|
||||
return $_apps{$type}->(@_) if ( defined $_apps{$type} );
|
||||
if ( defined $builder{$type} ) {
|
||||
|
|
Loading…
Reference in New Issue