Replace web server port by a Makefile variable
This commit is contained in:
parent
3d22c04d9b
commit
7d638ee9e9
12
Makefile
12
Makefile
|
@ -103,6 +103,7 @@ DNSDOMAIN=example.com
|
|||
|
||||
# Virtual Host Listen IP and Port (*, *:80, ...)
|
||||
VHOSTLISTEN=*:80
|
||||
WEBSERVERPORT=19876
|
||||
|
||||
# Other
|
||||
VERSION=`head -n1 changelog |sed -e 's/lemonldap-ng (//' -e 's/).*$$//'`
|
||||
|
@ -223,25 +224,26 @@ prepare_test_server:
|
|||
$(MAKE) install_webserver_conf \
|
||||
RCONFDIR=e2e-tests/conf \
|
||||
ERASECONFIG=1 \
|
||||
VHOSTLISTEN='*:19876' \
|
||||
VHOSTLISTEN='*:$(WEBSERVERPORT)' \
|
||||
PORTALDIR=`pwd`/lemonldap-ng-portal/example \
|
||||
MANAGERDIR=`pwd`/lemonldap-ng-manager/site \
|
||||
MANAGERPSGIDIR=`pwd`/e2e-tests \
|
||||
DEFDOCDIR=`pwd`/doc \
|
||||
FRDOCDIR=`pwd`/po-doc/fr
|
||||
cp e2e-tests/lmConf-1.js e2e-tests/lemonldap-ng.ini e2e-tests/env.conf e2e-tests/conf/
|
||||
perl -i -pe 'BEGIN{$$p=`pwd`;chomp $$p}s#__pwd__#$$p#;' e2e-tests/conf/lemonldap-ng.ini e2e-tests/conf/lmConf-1.js e2e-tests/conf/env.conf
|
||||
perl -i -pe 'BEGIN{$$p=`pwd`;chomp $$p}s#__pwd__#$$p#;s/__port__/$(WEBSERVERPORT)/' e2e-tests/conf/lemonldap-ng.ini e2e-tests/conf/lmConf-1.js e2e-tests/conf/env.conf
|
||||
|
||||
start_web_server: prepare_test_server
|
||||
# Start web server (designed for Debian, path may be broken else)
|
||||
# Clean old server
|
||||
-@[ -e e2e-tests/conf/apache2.pid ] && kill `cat e2e-tests/conf/apache2.pid` && sleep 1
|
||||
# Start web server (designed for Debian, path may be broken else)
|
||||
@LLNG_DEFAULTCONFFILE=`pwd`/e2e-tests/conf/lemonldap-ng.ini /usr/sbin/apache2 -d `pwd`/e2e-tests -f apache2.conf -k start
|
||||
|
||||
launch_protractor:
|
||||
# Start e2e tests
|
||||
# NB: you must have protractor installed (using npm install -g protractor)
|
||||
# and have run update-webdriver at least once
|
||||
@protractor e2e-tests/protractor-conf.js
|
||||
@WEBSERVERPORT=$(WEBSERVERPORT) protractor e2e-tests/protractor-conf.js
|
||||
|
||||
stop_web_server:
|
||||
# Stop web server
|
||||
|
@ -249,6 +251,8 @@ stop_web_server:
|
|||
# Clean
|
||||
@rm -rf e2e-tests/conf
|
||||
|
||||
restart_web_server: start_web_server
|
||||
|
||||
#
|
||||
# INSTALL
|
||||
#
|
||||
|
|
|
@ -5,7 +5,6 @@ MaxKeepAliveRequests 100
|
|||
KeepAliveTimeout 5
|
||||
HostnameLookups Off
|
||||
LogLevel debug
|
||||
Listen 127.0.0.1:19876
|
||||
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
|
||||
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
|
||||
<Directory />
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('my app', function() {
|
|||
describe('Auth mechanism', function() {
|
||||
|
||||
it('should want to authenticate', function() {
|
||||
browser.driver.get('http://auth.example.com:19876/');
|
||||
browser.driver.get('http://auth.example.com:'+process.env.WEBSERVERPORT+'/');
|
||||
browser.driver.findElement(by.xpath("//input[@name='user']")).sendKeys('dwho');
|
||||
browser.driver.findElement(by.xpath("//input[@name='password']")).sendKeys('dwho');
|
||||
browser.driver.findElement(by.xpath("//button[@type='submit']")).click();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
describe('Auth mechanism', function() {
|
||||
|
||||
it('should allow logout', function() {
|
||||
browser.driver.get('http://auth.example.com:19876/?logout=1');
|
||||
browser.driver.get('http://auth.example.com:'+process.env.WEBSERVERPORT+'/?logout=1');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
Listen 127.0.0.1:__port__
|
||||
FcgidInitialEnv LLNG_DEFAULTCONFFILE __pwd__/e2e-tests/conf/lemonldap-ng.ini
|
||||
SetEnv LLNG_DEFAULTCONFFILE __pwd__/e2e-tests/conf/lemonldap-ng.ini
|
||||
<perl>
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
"LockDirectory": "__pwd__/e2e-tests/conf/lock",
|
||||
"generateModule": "Lemonldap::NG::Common::Apache::Session::Generate::SHA256"
|
||||
},
|
||||
"portal": "http://auth.example.com:19876/",
|
||||
"portal": "http://auth.example.com:__port__/",
|
||||
"registerDB": "Null",
|
||||
"reloadUrls": {
|
||||
"reload.example.com": "http://reload.example.com/reload"
|
||||
|
|
|
@ -11,7 +11,7 @@ exports.config = {
|
|||
|
||||
chromeOnly: true,
|
||||
|
||||
baseUrl: 'http://manager.example.com:19876/',
|
||||
baseUrl: 'http://manager.example.com:'+process.env.WEBSERVERPORT+'/',
|
||||
|
||||
framework: 'jasmine',
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user