Nginx Test 3 Added

This commit is contained in:
Mitchell Krog 2017-08-27 11:10:50 +02:00
parent f6899b6a8b
commit ebfc501d13
No known key found for this signature in database
GPG key ID: 2BB9A077C8DD6994
15 changed files with 106 additions and 27 deletions

View file

View file

View file

@ -0,0 +1,6 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (52) Empty reply from server

View file

@ -0,0 +1,6 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (52) Empty reply from server

View file

@ -0,0 +1,6 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (52) Empty reply from server

View file

@ -0,0 +1,6 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (52) Empty reply from server

View file

@ -0,0 +1,7 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
<?php
echo "Welcome to Nginx\n";
echo "This is the Travis Testing Environment for the Nginx Ultimate Bad Bot Blocker\n";
echo "Visit https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker\n";

View file

@ -0,0 +1,7 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
<?php
echo "Welcome to Nginx\n";
echo "This is the Travis Testing Environment for the Nginx Ultimate Bad Bot Blocker\n";
echo "Visit https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker\n";

View file

@ -0,0 +1,7 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
<?php
echo "Welcome to Nginx\n";
echo "This is the Travis Testing Environment for the Nginx Ultimate Bad Bot Blocker\n";
echo "Visit https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker\n";

View file

@ -0,0 +1,7 @@
Last Tested: Sun Aug 27 10:49:21 SAST 2017
<?php
echo "Welcome to Nginx\n";
echo "This is the Travis Testing Environment for the Nginx Ultimate Bad Bot Blocker\n";
echo "Visit https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker\n";

View file

@ -54,6 +54,7 @@ sudo cp /etc/nginx/nginx.conf $TRAVIS_BUILD_DIR/.dev-tools/_nginx_conf_backup/ng
# Delete default site created by Nginx Installation # Delete default site created by Nginx Installation
# ************************************************* # *************************************************
printf '\n%s\n%s\n%s\n\n' "###################################" "STARTING NGINX TEST 1" "###################################"
printf '\n%s\n%s\n%s\n\n' "###########################################" "Delete any default files installed by Nginx" "###########################################" printf '\n%s\n%s\n%s\n\n' "###########################################" "Delete any default files installed by Nginx" "###########################################"
sudo rm /etc/nginx/sites-available/default sudo rm /etc/nginx/sites-available/default
sudo rm /etc/nginx/sites-enabled/default sudo rm /etc/nginx/sites-enabled/default

View file

@ -47,6 +47,7 @@
# Make Sure We Cleanup From Nginx Test 1 # Make Sure We Cleanup From Nginx Test 1
# ************************************** # **************************************
printf '\n%s\n%s\n%s\n\n' "###################################" "STARTING NGINX TEST 2" "###################################"
printf '\n%s\n%s\n%s\n\n' "###################################" "Cleaning up Files from Nginx Test 1" "###################################" printf '\n%s\n%s\n%s\n\n' "###################################" "Cleaning up Files from Nginx Test 1" "###################################"
sudo rm /etc/nginx/sites-available/default.vhost sudo rm /etc/nginx/sites-available/default.vhost
sudo rm /etc/nginx/sites-enabled/default.vhost sudo rm /etc/nginx/sites-enabled/default.vhost
@ -229,6 +230,14 @@ sudo service nginx reload
printf '\n%s\n%s\n%s\n\n' "##############################################################################" "Copy latest generated globalblacklist.conf file to test for any compile errors" "##############################################################################" printf '\n%s\n%s\n%s\n\n' "##############################################################################" "Copy latest generated globalblacklist.conf file to test for any compile errors" "##############################################################################"
sudo cp $TRAVIS_BUILD_DIR/conf.d/globalblacklist.conf /usr/local/nginx/conf.d/globalblacklist.conf sudo cp $TRAVIS_BUILD_DIR/conf.d/globalblacklist.conf /usr/local/nginx/conf.d/globalblacklist.conf
# **************************
# Run setup-ngxblocker Again
# **************************
printf '\n%s\n%s\n%s\n\n' "####################" "Run setup-ngxblocker to fix includes in globalblacklist.conf" "####################"
cd /usr/sbin
sudo bash ./setup-ngxblocker -x -c /usr/local/nginx/conf.d -b /usr/local/nginx/bots.d
# ********************* # *********************
# Force reload of Nginx # Force reload of Nginx
# ********************* # *********************

View file

@ -47,6 +47,7 @@
# Make Sure We Cleanup From Nginx Test 2 # Make Sure We Cleanup From Nginx Test 2
# ************************************** # **************************************
printf '\n%s\n%s\n%s\n\n' "###################################" "STARTING NGINX TEST 3" "###################################"
printf '\n%s\n%s\n%s\n\n' "###################################" "Cleaning up Files from Nginx Test 2" "###################################" printf '\n%s\n%s\n%s\n\n' "###################################" "Cleaning up Files from Nginx Test 2" "###################################"
sudo rm /etc/nginx/sites-available/default.vhost sudo rm /etc/nginx/sites-available/default.vhost
sudo rm /etc/nginx/sites-enabled/default.vhost sudo rm /etc/nginx/sites-enabled/default.vhost
@ -55,6 +56,12 @@ sudo rm /usr/local/nginx/conf.d/*.conf
sudo rm /usr/local/nginx/bots.d/*.conf sudo rm /usr/local/nginx/bots.d/*.conf
printf '\n%s\n%s\n%s\n\n' "########################################" "Cleaning up Files from Nginx Test 2 DONE" "########################################" printf '\n%s\n%s\n%s\n\n' "########################################" "Cleaning up Files from Nginx Test 2 DONE" "########################################"
# *******************************************************
# Restore backup of the clean and default nginx.conf file
# ******************************************************
sudo cp $TRAVIS_BUILD_DIR/.dev-tools/_nginx_conf_backup/nginx.conf /etc/nginx/nginx.conf
# ************************************* # *************************************
# List Directories to Confirm Deletions # List Directories to Confirm Deletions
# ************************************* # *************************************
@ -133,7 +140,7 @@ sudo nginx -c /etc/nginx/nginx.conf
# ****************************************************************************************** # ******************************************************************************************
# Run update-ngxblocker test which downloads latest globalblacklist.conf and reloads Nginx # Run update-ngxblocker test which downloads latest globalblacklist.conf and reloads Nginx
# This second test forces update-ngxblocker to re-write the Include location to non standard # This second test forces update-ngxblocker to re-write the Include location to non standard
# location of /usr/local/nginx/bots.d # location of /etc/nginx/mybots.d
# ****************************************************************************************** # ******************************************************************************************
# **************************************************************************************** # ****************************************************************************************
@ -141,7 +148,7 @@ sudo nginx -c /etc/nginx/nginx.conf
# **************************************************************************************** # ****************************************************************************************
printf '\n%s\n%s\n%s\n\n' "####################################################" "Copy older globalblacklist.conf file to force update" "####################################################" printf '\n%s\n%s\n%s\n\n' "####################################################" "Copy older globalblacklist.conf file to force update" "####################################################"
sudo cp $TRAVIS_BUILD_DIR/.dev-tools/globalblacklist-dummy.conf /usr/local/nginx/conf.d/globalblacklist.conf sudo cp $TRAVIS_BUILD_DIR/.dev-tools/globalblacklist-dummy.conf /etc/nginx/myconf.d/globalblacklist.conf
# **************************************************************************************** # ****************************************************************************************
# Run update-ngxblocker test which downloads latest globalblacklist.conf and reloads Nginx # Run update-ngxblocker test which downloads latest globalblacklist.conf and reloads Nginx
@ -149,7 +156,7 @@ sudo cp $TRAVIS_BUILD_DIR/.dev-tools/globalblacklist-dummy.conf /usr/local/nginx
printf '\n%s\n%s\n%s\n\n' "######################" "Run update-ngxblocker" "######################" printf '\n%s\n%s\n%s\n\n' "######################" "Run update-ngxblocker" "######################"
cd /usr/sbin cd /usr/sbin
sudo bash ./update-ngxblocker -c /usr/local/nginx/conf.d -b /usr/local/nginx/bots.d -n sudo bash ./update-ngxblocker -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d -n
# ********************* # *********************
# Force reload of Nginx # Force reload of Nginx
@ -163,17 +170,17 @@ sudo service nginx reload
# ******************************************************************************************* # *******************************************************************************************
printf '\n%s\n%s\n%s\n\n' "####################################################################" "Delete existing files to force update-ngxblocker to re-download them" "####################################################################" printf '\n%s\n%s\n%s\n\n' "####################################################################" "Delete existing files to force update-ngxblocker to re-download them" "####################################################################"
sudo rm /usr/local/nginx/conf.d/*.conf sudo rm /etc/nginx/myconf.d/*.conf
sudo rm /usr/local/nginx/bots.d/*.conf sudo rm /etc/nginx/mybots.d/*.conf
# ************************************* # *************************************
# List Directories to Confirm Deletions # List Directories to Confirm Deletions
# ************************************* # *************************************
printf '\n%s\n%s\n%s\n\n' "######################################################" "Confirming /usr/local/nginx/conf.d/ directory is EMPTY" "######################################################" printf '\n%s\n%s\n%s\n\n' "######################################################" "Confirming /usr/local/nginx/conf.d/ directory is EMPTY" "######################################################"
ls -la /usr/local/nginx/conf.d/ ls -la /etc/nginx/myconf.d/
printf '\n%s\n%s\n%s\n\n' "######################################################" "Confirming /usr/local/nginx/bots.d/ directory is EMPTY" "######################################################" printf '\n%s\n%s\n%s\n\n' "######################################################" "Confirming /usr/local/nginx/bots.d/ directory is EMPTY" "######################################################"
ls -la /usr/local/nginx/bots.d/ ls -la /etc/nginx/mybots.d/
# ********************************************************************************************************* # *********************************************************************************************************
# Run update-ngxblocker to test for missing files and download latest globalblacklist.conf and reload Nginx # Run update-ngxblocker to test for missing files and download latest globalblacklist.conf and reload Nginx
@ -181,23 +188,23 @@ ls -la /usr/local/nginx/bots.d/
printf '\n%s\n%s\n%s\n\n' "######################" "Run update-ngxblocker" "######################" printf '\n%s\n%s\n%s\n\n' "######################" "Run update-ngxblocker" "######################"
cd /usr/sbin cd /usr/sbin
sudo bash ./update-ngxblocker -c /usr/local/nginx/conf.d -b /usr/local/nginx/bots.d -n sudo bash ./update-ngxblocker -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d -n
# **************************************************** # ****************************************************
# List Directories to Confirm Downloaded Missing Files # List Directories to Confirm Downloaded Missing Files
# **************************************************** # ****************************************************
printf '\n%s\n%s\n%s\n\n' "#############################################################################################" "Confirming /usr/local/nginx/conf.d/ directory has missing files replaced by update-ngxblocker" "#############################################################################################" printf '\n%s\n%s\n%s\n\n' "#############################################################################################" "Confirming /etc/nginx/myconf.d/ directory has missing files replaced by update-ngxblocker" "#############################################################################################"
ls -la /usr/local/nginx/conf.d/ ls -la /etc/nginx/myconf.d/
printf '\n%s\n%s\n%s\n\n' "#############################################################################################" "Confirming /usr/local/nginx/bots.d/ directory has missing files replaced by update-ngxblocker" "#############################################################################################" printf '\n%s\n%s\n%s\n\n' "#############################################################################################" "Confirming /etc/nginx/mybots.d/ directory has missing files replaced by update-ngxblocker" "#############################################################################################"
ls -la /usr/local/nginx/bots.d/ ls -la /etc/nginx/mybots.d/
# **************************************************************************************** # ****************************************************************************************
# Copy a dummy version of globalblacklist.conf with an older version number to test update # Copy a dummy version of globalblacklist.conf with an older version number to test update
# **************************************************************************************** # ****************************************************************************************
printf '\n%s\n%s\n%s\n\n' "####################################################" "Copy older globalblacklist.conf file to force update" "####################################################" printf '\n%s\n%s\n%s\n\n' "####################################################" "Copy older globalblacklist.conf file to force update" "####################################################"
sudo cp $TRAVIS_BUILD_DIR/.dev-tools/globalblacklist-dummy.conf /usr/local/nginx/conf.d/globalblacklist.conf sudo cp $TRAVIS_BUILD_DIR/.dev-tools/globalblacklist-dummy.conf /etc/nginx/myconf.d/globalblacklist.conf
# ********************************************************************************************************* # *********************************************************************************************************
# Run update-ngxblocker to test for missing files and download latest globalblacklist.conf and reload Nginx # Run update-ngxblocker to test for missing files and download latest globalblacklist.conf and reload Nginx
@ -205,7 +212,7 @@ sudo cp $TRAVIS_BUILD_DIR/.dev-tools/globalblacklist-dummy.conf /usr/local/nginx
printf '\n%s\n%s\n%s\n\n' "######################" "Run update-ngxblocker" "######################" printf '\n%s\n%s\n%s\n\n' "######################" "Run update-ngxblocker" "######################"
cd /usr/sbin cd /usr/sbin
sudo bash ./update-ngxblocker -c /usr/local/nginx/conf.d -b /usr/local/nginx/bots.d -n sudo bash ./update-ngxblocker -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d -n
# ************************** # **************************
# Run setup-ngxblocker Again # Run setup-ngxblocker Again
@ -213,7 +220,7 @@ sudo bash ./update-ngxblocker -c /usr/local/nginx/conf.d -b /usr/local/nginx/bot
printf '\n%s\n%s\n%s\n\n' "####################" "Run setup-ngxblocker" "####################" printf '\n%s\n%s\n%s\n\n' "####################" "Run setup-ngxblocker" "####################"
cd /usr/sbin cd /usr/sbin
sudo bash ./setup-ngxblocker -x -c /usr/local/nginx/conf.d -b /usr/local/nginx/bots.d sudo bash ./setup-ngxblocker -x -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d
# ********************* # *********************
# Force reload of Nginx # Force reload of Nginx
@ -227,7 +234,15 @@ sudo service nginx reload
# ******************************************************* # *******************************************************
printf '\n%s\n%s\n%s\n\n' "##############################################################################" "Copy latest generated globalblacklist.conf file to test for any compile errors" "##############################################################################" printf '\n%s\n%s\n%s\n\n' "##############################################################################" "Copy latest generated globalblacklist.conf file to test for any compile errors" "##############################################################################"
sudo cp $TRAVIS_BUILD_DIR/conf.d/globalblacklist.conf /usr/local/nginx/conf.d/globalblacklist.conf sudo cp $TRAVIS_BUILD_DIR/conf.d/globalblacklist.conf /etc/nginx/myconf.d/globalblacklist.conf
# **************************
# Run setup-ngxblocker Again
# **************************
printf '\n%s\n%s\n%s\n\n' "####################" "Run setup-ngxblocker to fix includes in globalblacklist.conf" "####################"
cd /usr/sbin
sudo bash ./setup-ngxblocker -x -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d
# ********************* # *********************
# Force reload of Nginx # Force reload of Nginx
@ -243,11 +258,11 @@ sudo service nginx reload
printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "######################" printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "######################"
# ************************************************************ # ************************************************************
# Copy all .conf files used in Test 2 to a folder for checking # Copy all .conf files used in Test 3 to a folder for checking
# ************************************************************ # ************************************************************
sudo cp /usr/local/nginx/bots.d/* $TRAVIS_BUILD_DIR/.dev-tools/_conf_files_test2/bots.d/ sudo cp /etc/nginx/mybots.d/* $TRAVIS_BUILD_DIR/.dev-tools/_conf_files_test3/bots.d/
sudo cp /usr/local/nginx/conf.d/* $TRAVIS_BUILD_DIR/.dev-tools/_conf_files_test2/conf.d/ sudo cp /etc/nginx/myconf.d/* $TRAVIS_BUILD_DIR/.dev-tools/_conf_files_test3/conf.d/
# ***************************************************************************************** # *****************************************************************************************
# Travis now moves into running the rest of the tests in the script: section of .travis.yml # Travis now moves into running the rest of the tests in the script: section of .travis.yml

View file

@ -20,14 +20,14 @@
# Set Location of our Curl Test Results Files # Set Location of our Curl Test Results Files
# ******************************************* # *******************************************
_curltest1=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest1.txt _curltest1=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest1.txt
_curltest2=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest2.txt _curltest2=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest2.txt
_curltest3=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest3.txt _curltest3=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest3.txt
_curltest4=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest4.txt _curltest4=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest4.txt
_curltest5=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest5.txt _curltest5=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest5.txt
_curltest6=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest6.txt _curltest6=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest6.txt
_curltest7=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest7.txt _curltest7=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest7.txt
_curltest8=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_2/curltest8.txt _curltest8=$TRAVIS_BUILD_DIR/.dev-tools/_curl_tests_3/curltest8.txt
_now="$(date)" _now="$(date)"
# ************************************************* # *************************************************

View file

@ -39,6 +39,8 @@ script:
- bash .dev-tools/run-curl-tests-1.sh - bash .dev-tools/run-curl-tests-1.sh
- bash .dev-tools/install-nginx-2.sh - bash .dev-tools/install-nginx-2.sh
- bash .dev-tools/run-curl-tests-2.sh - bash .dev-tools/run-curl-tests-2.sh
- bash .dev-tools/install-nginx-3.sh
- bash .dev-tools/run-curl-tests-3.sh
- bash .dev-tools/modify-files-and-commit.sh - bash .dev-tools/modify-files-and-commit.sh
before_deploy: before_deploy: