From cfeda0848b9b417f0a516cf5d557adb3de9cb91e Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 10 Mar 2013 16:41:21 +0100 Subject: [PATCH] fix msmoke test config to adapt to changing PG ports; remove superfluous mods.conf --- tests/apache/etc/config.php | 121 -------------------------------------- tests/apache/etc/config.php.tmpl | 121 ++++++++++++++++++++++++++++++++++++++ tests/apache/etc/mods.conf | 6 -- tests/setup-clean.sh | 2 +- tests/setup-start.sh | 7 ++- 5 files changed, 127 insertions(+), 130 deletions(-) delete mode 100644 tests/apache/etc/config.php create mode 100644 tests/apache/etc/config.php.tmpl delete mode 100644 tests/apache/etc/mods.conf diff --git a/tests/apache/etc/config.php b/tests/apache/etc/config.php deleted file mode 100644 index 66ddce2..0000000 --- a/tests/apache/etc/config.php +++ /dev/null @@ -1,121 +0,0 @@ -setPrefix("smoke2_"); -//set this only if you want debug messages on error (developers only): -//$db->setDebugMode(); - - -//////////// -// DB Administration - -//use this for DB creation and upgrading, comment it out otherwise -//change the passcode before using this on a production system!!! -$db->setAdminPassCode("Admin","Test"); - - -//////////// -//Dedicated Client Configuration - -//Authenticated session timeout - how long an authenticated session lasts -// this should usually be a few hours (3600s per hour) -$ClientSessionTimeout=2*3600; - - -/////////// -//Web-Client Configuration - -//Template directory -$template="./template/"; - -//Renderer options -$twigoptions = array( - //cache points to: - // a (relative) path to store cached pages in, or - // false to switch caching off - //'cache' => './tcache', - 'cache' => false, - - //character set, default is utf-8 - 'charset' => 'utf-8', - - //enable this while you are actively changing code/templates and use a cache: - //'auto_reload' => true, - - //enable this to throw an exception if an undefined variable is used, - //disable in final deployment: - 'strict_variables' => true, -); -$twigextensions = array( - //HTML code auto-escaper: - 'Escaper', - //Sandbox - cannot be loaded like this: it needs extensive configuration - //I18n - you also have to configure PHPs gettext extension to actually use this -); - -//how long the stuff in a shopping cart is stored -// this is the time that can go by while the user is looking around without touching -// the cart -$CartTimeout=30*60; - -//Authenticated web session timeout - -// how long a web session lasts without a refresh; -// this should usually be on the order of 10-30 minutes (the value is in seconds) -$WebSessionTimeout=15*60; - -//whether to show errors in the web client - usually turned off in production mode -$WebShowErrors=true; - -//default shipping for the web UI -// true if shipping is enforced, false if the user may opt out of chosing a shipping option -$WebForceShipping=true; -// the default shipping type as DB ID, you see the ID in the "Edit shipping Options" dialog, -// the option must be available to users with the flag _web, -// set this to -1 if you do not want a default option -$WebDefaultShipping=1; - -//customer flags -// list of flags that customers can have, separated by spaces -$WebCustomerFlags="newsletter reminder"; - -//order flags -// you can add arbitrary input fields to the checkout page, this array defines -// what values they must have, this can be used for acknowledging standard -// form contract (German: AGB) clauses or other formalities that you need to -// present at EVERY check out -$WebOrderFields=array(); -//example: standard form contract -$WebOrderFields['sfc_ack']='on'; - -//customer password reset -// this is the time in seconds that the customer has to click on the reset link -$CustomerResetTime=1 * 60 * 60; - -//base URL for the customer subsystem -// leave commented out or empty if MagicSmoke should figure it out automatically -// $BaseUrl = "https://localhost/smoke/index.php"; - -//make sure files are interpreted as UTF-8 -// mb_language('uni'); - -//done -return; - -?> \ No newline at end of file diff --git a/tests/apache/etc/config.php.tmpl b/tests/apache/etc/config.php.tmpl new file mode 100644 index 0000000..d4ff259 --- /dev/null +++ b/tests/apache/etc/config.php.tmpl @@ -0,0 +1,121 @@ +setPrefix("smoke2_"); +//set this only if you want debug messages on error (developers only): +//$db->setDebugMode(); + + +//////////// +// DB Administration + +//use this for DB creation and upgrading, comment it out otherwise +//change the passcode before using this on a production system!!! +$db->setAdminPassCode("Admin","Test"); + + +//////////// +//Dedicated Client Configuration + +//Authenticated session timeout - how long an authenticated session lasts +// this should usually be a few hours (3600s per hour) +$ClientSessionTimeout=2*3600; + + +/////////// +//Web-Client Configuration + +//Template directory +$template="./template/"; + +//Renderer options +$twigoptions = array( + //cache points to: + // a (relative) path to store cached pages in, or + // false to switch caching off + //'cache' => './tcache', + 'cache' => false, + + //character set, default is utf-8 + 'charset' => 'utf-8', + + //enable this while you are actively changing code/templates and use a cache: + //'auto_reload' => true, + + //enable this to throw an exception if an undefined variable is used, + //disable in final deployment: + 'strict_variables' => true, +); +$twigextensions = array( + //HTML code auto-escaper: + 'Escaper', + //Sandbox - cannot be loaded like this: it needs extensive configuration + //I18n - you also have to configure PHPs gettext extension to actually use this +); + +//how long the stuff in a shopping cart is stored +// this is the time that can go by while the user is looking around without touching +// the cart +$CartTimeout=30*60; + +//Authenticated web session timeout - +// how long a web session lasts without a refresh; +// this should usually be on the order of 10-30 minutes (the value is in seconds) +$WebSessionTimeout=15*60; + +//whether to show errors in the web client - usually turned off in production mode +$WebShowErrors=true; + +//default shipping for the web UI +// true if shipping is enforced, false if the user may opt out of chosing a shipping option +$WebForceShipping=true; +// the default shipping type as DB ID, you see the ID in the "Edit shipping Options" dialog, +// the option must be available to users with the flag _web, +// set this to -1 if you do not want a default option +$WebDefaultShipping=1; + +//customer flags +// list of flags that customers can have, separated by spaces +$WebCustomerFlags="newsletter reminder"; + +//order flags +// you can add arbitrary input fields to the checkout page, this array defines +// what values they must have, this can be used for acknowledging standard +// form contract (German: AGB) clauses or other formalities that you need to +// present at EVERY check out +$WebOrderFields=array(); +//example: standard form contract +$WebOrderFields['sfc_ack']='on'; + +//customer password reset +// this is the time in seconds that the customer has to click on the reset link +$CustomerResetTime=1 * 60 * 60; + +//base URL for the customer subsystem +// leave commented out or empty if MagicSmoke should figure it out automatically +// $BaseUrl = "https://localhost/smoke/index.php"; + +//make sure files are interpreted as UTF-8 +// mb_language('uni'); + +//done +return; + +?> \ No newline at end of file diff --git a/tests/apache/etc/mods.conf b/tests/apache/etc/mods.conf deleted file mode 100644 index 9b5a03e..0000000 --- a/tests/apache/etc/mods.conf +++ /dev/null @@ -1,6 +0,0 @@ - -LoadModule php5_module /usr/lib/apache2/modules/libphp5.so -LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so -LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so -LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so - diff --git a/tests/setup-clean.sh b/tests/setup-clean.sh index d6b80ae..b9aa510 100755 --- a/tests/setup-clean.sh +++ b/tests/setup-clean.sh @@ -25,7 +25,7 @@ rm -rf apache/log apache/www ( cd apache/etc for i in *.tmpl ; do rm -f ${i%.tmpl} ; done - rm -f server.* + rm -f server.* mods.conf ) exit 0 diff --git a/tests/setup-start.sh b/tests/setup-start.sh index cb51d33..0e17602 100755 --- a/tests/setup-start.sh +++ b/tests/setup-start.sh @@ -25,7 +25,9 @@ test -f config || { cd db/etc for i in *.tmpl ; do sed "s,@@,$PG_DD," <$i | \ - sed "s,@PGPORT@,$PG_PORT," \ + sed "s,@PGPORT@,$PG_PORT," | \ + sed "s,@HTTPPORT@,$HTTP_PORT," | \ + sed "s,@HTTPSPORT@,$HTTPS_PORT," \ >${i%.tmpl} done ) @@ -52,8 +54,9 @@ mkdir -p apache/log cd apache/etc for i in *.tmpl ; do sed "s,@@,$ADIR," <$i | \ + sed "s,@PGPORT@,$PG_PORT," | \ sed "s,@HTTPPORT@,$HTTP_PORT," | \ - sed "s,@HTTPSPORT@,$HTTPS_PORT," \ + sed "s,@HTTPSPORT@,$HTTPS_PORT," \ >${i%.tmpl} done ln -sf ../../ssl/server.* . || true -- 1.7.2.5