mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Update the condition that checks the integration in core tests
This commit is contained in:
parent
579c80357f
commit
db99d16874
27 changed files with 41 additions and 38 deletions
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🤖 Building antibot stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🤖 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🔐 Building authbasic stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🔐 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "📟 Building badbehavior stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "📟 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🏴 Building blacklist stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🏴 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "📦 Building brotli stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "📦 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🕸️ Building bunkernet stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🕸️ Pull failed ❌"
|
||||
|
|
@ -50,7 +50,7 @@ end=0
|
|||
cleanup_stack () {
|
||||
exit_code=$?
|
||||
if [[ $end -eq 1 || $exit_code = 1 ]] || [[ $end -eq 0 && $exit_code = 0 ]] && [ $manual = 0 ] ; then
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@USE_BUNKERNET: "no"@USE_BUNKERNET: "yes"@' {} \;
|
||||
else
|
||||
sudo sed -i 's@USE_BUNKERNET=.*$@USE_BUNKERNET=yes@' /etc/bunkerweb/variables.env
|
||||
|
|
@ -67,7 +67,6 @@ cleanup_stack () {
|
|||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose down -v --remove-orphans
|
||||
else
|
||||
curl http://127.0.0.1:8080/reset
|
||||
sudo systemctl stop bunkerweb
|
||||
sudo truncate -s 0 /var/log/bunkerweb/error.log
|
||||
fi
|
||||
|
|
@ -217,6 +216,10 @@ do
|
|||
cleanup_stack
|
||||
manual=0
|
||||
|
||||
if [ "$integration" == "linux" ] ; then
|
||||
curl http://127.0.0.1:8080/reset
|
||||
fi
|
||||
|
||||
echo " "
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "⌨️ Building bwcli stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "⌨️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "📝 Building clientcache stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "📝 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🛰️ Building cors stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🛰️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🌍 Building country stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🌍 Pull failed ❌"
|
||||
|
|
@ -41,7 +41,7 @@ end=0
|
|||
cleanup_stack () {
|
||||
exit_code=$?
|
||||
if [[ $end -eq 1 || $exit_code = 1 ]] || [[ $end -eq 0 && $exit_code = 0 ]] && [ $manual = 0 ] ; then
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@BLACKLIST_COUNTRY: "US"@BLACKLIST_COUNTRY: ""@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@WHITELIST_COUNTRY: "FR"@WHITELIST_COUNTRY: ""@' {} \;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🔏 Building customcert stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🔏 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "💾 Building db stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "💾 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🚫 Building dnsbl stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🚫 Pull failed ❌"
|
||||
|
|
@ -80,7 +80,7 @@ cleanup_stack () {
|
|||
trap cleanup_stack EXIT
|
||||
|
||||
echo "🚫 Initializing workspace ..."
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
rm -rf init/output
|
||||
mkdir -p init/output
|
||||
docker compose -f docker-compose.init.yml up --build
|
||||
|
|
@ -116,7 +116,7 @@ for test in "activated" "deactivated" "list"
|
|||
do
|
||||
if [ "$test" = "activated" ] ; then
|
||||
echo "🚫 Running tests with DNSBL activated and the server $server added to the list ..."
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@DNSBL_LIST: ".*"@DNSBL_LIST: "'"$server"'"@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@ipv4_address: 192.168@ipv4_address: '"${ip%%.*}"'.0@' {} \;
|
||||
sed -i 's@subnet: 192.168@subnet: '"${ip%%.*}"'.0@' docker-compose.yml
|
||||
|
|
@ -128,7 +128,7 @@ do
|
|||
fi
|
||||
elif [ "$test" = "deactivated" ] ; then
|
||||
echo "🚫 Running tests without DNSBL ..."
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@USE_DNSBL: "yes"@USE_DNSBL: "no"@' {} \;
|
||||
else
|
||||
sudo sed -i 's@USE_DNSBL=.*$@USE_DNSBL=no@' /etc/bunkerweb/variables.env
|
||||
|
|
@ -136,7 +136,7 @@ do
|
|||
fi
|
||||
elif [ "$test" = "list" ] ; then
|
||||
echo "🚫 Running tests with DNSBL activated and without the server $server added to the list ..."
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@USE_DNSBL: "no"@USE_DNSBL: "yes"@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@DNSBL_LIST: ".*"@DNSBL_LIST: ""@' {} \;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "⭕ Building errors stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "⭕ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🏁 Building greylist stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🏁 Pull failed ❌"
|
||||
|
|
@ -60,7 +60,7 @@ AS_NUMBER=0
|
|||
cleanup_stack () {
|
||||
exit_code=$?
|
||||
if [[ $end -eq 1 || $exit_code = 1 ]] || [[ $end -eq 0 && $exit_code = 0 ]] && [ $manual = 0 ] ; then
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
rm -rf init/output
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@USE_GREYLIST: "yes"@USE_GREYLIST: "no"@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@GREYLIST_IP: "192.168.0.0/24"@GREYLIST_IP: ""@' {} \;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🗜️ Building gzip stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🗜️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🎛️ Building headers stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker bw-php
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🎛️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "💉 Building inject stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "💉 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🎚️ Building limit stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🎚️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🗃️ Building misc stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🗃️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "👮 Building modsecurity stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "👮 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "↩️ Building redirect stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker app1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "↩️ Pull failed ❌"
|
||||
|
|
@ -36,7 +36,7 @@ end=0
|
|||
cleanup_stack () {
|
||||
exit_code=$?
|
||||
if [[ $end -eq 1 || $exit_code = 1 ]] || [[ $end -eq 0 && $exit_code = 0 ]] && [ $manual = 0 ] ; then
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@REDIRECT_TO: "http://brightlushsilveryawn\.neverssl\.com/online/"@REDIRECT_TO: ""@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@REDIRECT_TO_REQUEST_URI: "yes"@REDIRECT_TO_REQUEST_URI: "no"@' {} \;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🧰 Building redis stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🧰 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🕵️ Building reversescan stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🕵️ Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🔑 Building selfsigned stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🔑 Pull failed ❌"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🧳 Building sessions stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🧳 Pull failed ❌"
|
||||
|
|
@ -38,7 +38,7 @@ end=0
|
|||
cleanup_stack () {
|
||||
exit_code=$?
|
||||
if [[ $end -eq 1 || $exit_code = 1 ]] || [[ $end -eq 0 && $exit_code = 0 ]] && [ $manual = 0 ] ; then
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@SESSIONS_SECRET: ".*"$@SESSIONS_SECRET: "random"@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@SESSIONS_NAME: ".*"$@SESSIONS_NAME: "random"@' {} \;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ fi
|
|||
echo "🏳️ Building whitelist stack for integration \"$integration\" ..."
|
||||
|
||||
# Starting stack
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
docker compose pull bw-docker
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "🏳️ Pull failed ❌"
|
||||
|
|
@ -63,7 +63,7 @@ AS_NUMBER=0
|
|||
cleanup_stack () {
|
||||
exit_code=$?
|
||||
if [[ $end -eq 1 || $exit_code = 1 ]] || [[ $end -eq 0 && $exit_code = 0 ]] && [ $manual = 0 ] ; then
|
||||
if [ "$integration" = "docker" ] ; then
|
||||
if [ "$integration" == "docker" ] ; then
|
||||
rm -rf init/output
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@USE_WHITELIST: "yes"@USE_WHITELIST: "no"@' {} \;
|
||||
find . -type f -name 'docker-compose.*' -exec sed -i 's@WHITELIST_IP: "192.168.0.0/24"@WHITELIST_IP: ""@' {} \;
|
||||
|
|
|
|||
Loading…
Reference in a new issue