TEST new template REF: #201

This commit is contained in:
Mitchell Krog 2019-06-27 13:56:12 +02:00
parent 8ff3b4c1fa
commit 472f476b21
No known key found for this signature in database
GPG key ID: C243C388553EDE5D
3 changed files with 33 additions and 31 deletions

View file

@ -60,13 +60,14 @@ printf '%s\t%s\n' "127.0.0.1" "0;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf /etc/nginx/bots.d/whitelist-ips.conf sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf /etc/nginx/bots.d/whitelist-ips.conf
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/botblocker-nginx-settings.conf /etc/nginx/conf.d/botblocker-nginx-settings.conf sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/botblocker-nginx-settings.conf /etc/nginx/conf.d/botblocker-nginx-settings.conf
printf "\n"
echo "${bold}${yellow}---------------------------------------------------"
echo "${bold}${yellow}Copy Test Unit of globalblacklist.conf file to test"
echo "${bold}${yellow}---------------------------------------------------"
printf "\n"
sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf /etc/nginx/conf.d/globalblacklist.conf #printf "\n"
#echo "${bold}${yellow}---------------------------------------------------"
#echo "${bold}${yellow}Copy Test Unit of globalblacklist.conf file to test"
#echo "${bold}${yellow}---------------------------------------------------"
#printf "\n"
#sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf /etc/nginx/conf.d/globalblacklist.conf
echo "${bold}${green}---------------" echo "${bold}${green}---------------"

View file

@ -34,35 +34,35 @@ defaultcolor=$(tput setaf default)
# Set Location of our Curl Test Results Files # Set Location of our Curl Test Results Files
# ******************************************* # *******************************************
echo "${bold}${green}------------------------------------------------" #echo "${bold}${green}------------------------------------------------"
echo "${bold}${green}Disable any User Whitelisting and set to Default" #echo "${bold}${green}Disable any User Whitelisting and set to Default"
echo "${bold}${green}------------------------------------------------" #echo "${bold}${green}------------------------------------------------"
printf "\n\n" #printf "\n\n"
sudo rm /etc/nginx/conf.d/*.conf #sudo rm /etc/nginx/conf.d/*.conf
sudo rm /etc/nginx/bots.d/*.conf #sudo rm /etc/nginx/bots.d/*.conf
ls -la /etc/nginx/conf.d/ #ls -la /etc/nginx/conf.d/
ls -la /etc/nginx/bots.d/ #ls -la /etc/nginx/bots.d/
printf "\n" #printf "\n"
echo "${bold}${magenta}-------------------------" #echo "${bold}${magenta}-------------------------"
echo "${bold}${magenta}Execute update-ngxblocker" #echo "${bold}${magenta}Execute update-ngxblocker"
echo "${bold}${magenta}-------------------------" #echo "${bold}${magenta}-------------------------"
printf "\n" #printf "\n"
cd /usr/sbin #cd /usr/sbin
sudo bash ./update-ngxblocker -n #sudo bash ./update-ngxblocker -n
echo "${bold}${green}---------------" #echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx" #echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------" #echo "${bold}${green}---------------"
printf "\n\n" #printf "\n\n"
sudo nginx -t && sudo nginx -s reload #sudo nginx -t && sudo nginx -s reload
echo "${bold}${yellow}-----------------------------------------------------------------------" #echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis" #echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------" #echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n\n" #printf "\n\n"
sleep 10s #sleep 10s
echo "${bold}${green}--------------" echo "${bold}${green}--------------"
echo "${bold}${green}Tests Starting" echo "${bold}${green}Tests Starting"

View file

@ -46,6 +46,7 @@ script:
#- bash .dev-tools/test-blocker-quick.sh #- bash .dev-tools/test-blocker-quick.sh
#- bash .dev-tools/install-nginx-4.sh #- bash .dev-tools/install-nginx-4.sh
#- bash .dev-tools/test-blocker-quick.sh #- bash .dev-tools/test-blocker-quick.sh
# FROM HERE WE TEST ANY NEW CHANGES TO THE BLOCKER
- bash .dev-tools/install-nginx-testing-of-changes.sh - bash .dev-tools/install-nginx-testing-of-changes.sh
- bash .dev-tools/test-blocker.sh - bash .dev-tools/test-blocker.sh
- bash .dev-tools/test-blocker-badwords.sh - bash .dev-tools/test-blocker-badwords.sh