first commit
This commit is contained in:
53
bin/fe_tests_entrypoint.sh
Normal file
53
bin/fe_tests_entrypoint.sh
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ -z "$DEVELOPMENT" ]] && export DEVELOPMENT=1
|
||||
[[ -z "$SYMFONY_ENV" ]] && export SYMFONY_ENV=prod
|
||||
[[ -z "$CONTAINER_DIR" ]] && export CONTAINER_DIR=../cache
|
||||
[[ -z "$VIRTUAL_HOST" ]] && export VIRTUAL_HOST=frontend
|
||||
|
||||
# Remove global $dbcfg loading -> do not depend on mariadb container
|
||||
FILE_PATH=/var/www/engine/web/common.php
|
||||
LINE=$(cat $FILE_PATH | grep -n '^\$dbcfg' | cut -d':' -f1)
|
||||
sed -i "${LINE}d" $FILE_PATH
|
||||
|
||||
# Remove loading of $dbcfg in RequestListener::isShopClosed
|
||||
FILE_PATH=/var/www/engine/bundles/KupShop/KupShopBundle/EventListener/RequestListener.php
|
||||
LINE=$(cat $FILE_PATH | grep -n 'function checkShopClosed' | cut -d':' -f1)
|
||||
LINE=$(($LINE + 1))
|
||||
|
||||
sed -i "${LINE}a return false\;" $FILE_PATH
|
||||
|
||||
# Remove request listeners touching database
|
||||
rm /var/www/engine/bundles/KupShop/KupShopBundle/EventListener/BlackfireRequestSubscriber.php
|
||||
rm /var/www/engine/bundles/KupShop/ProxyCacheBundle/EventListener/CacheKeyChangeListener.php
|
||||
|
||||
# Remove recaptcha module
|
||||
FILE=/var/www/engine/web/config.php
|
||||
echo "unset(\$cfg['Modules']['recaptcha']);" >> $FILE;
|
||||
|
||||
|
||||
# URL from which the images are downloaded - set to $VIRTUAL_HOST (self)
|
||||
FILE=/var/www/html/include/config.php
|
||||
if [ -e /var/www/html/config/config.php ]; then
|
||||
FILE=/var/www/html/config/config.php
|
||||
fi
|
||||
echo "\$cfg['Admin']['Login']['MasterPassword'] = '\$2y\$10\$zIqvTTBNbfNYm3UN48RREOcR8xH4x/WbKWyE5ptSTz2e9/GL62ou2';" >> $FILE
|
||||
|
||||
|
||||
# Remove polyfills
|
||||
FILE=/var/www/html/templates/base.tpl
|
||||
touch $FILE
|
||||
echo '{extends_parent} \
|
||||
{block "js-polyfills"}{/block}' >> $FILE
|
||||
|
||||
# Remove Sentry and GTM
|
||||
touch /var/www/html/templates/block.sentry.tpl
|
||||
|
||||
touch /var/www/html/templates/block.ga4.tpl
|
||||
touch /var/www/html/templates/block.gtm.script.tpl
|
||||
|
||||
mkdir -p /var/www/cache
|
||||
mkdir -p /var/www/html/data/tmp/sessions
|
||||
chmod 777 -R /var/www/html/data /var/www/cache /var/www/html/data/tmp/sessions
|
||||
|
||||
/usr/local/uwsgi/uwsgi /var/www/ci/docker/files/fe-test-uwsgi.ini
|
||||
Reference in New Issue
Block a user