From f2f57eca50d4e53bde8f440363aeec14d8744d7a Mon Sep 17 00:00:00 2001 From: Mitchell Krog Date: Thu, 20 Jun 2019 14:04:00 +0200 Subject: [PATCH] Fix Nginx Reloading in Build Tests / Debug Curl Tests --- .dev-tools/install-nginx-1.sh | 6 +++--- .dev-tools/install-nginx-2.sh | 6 +++--- .dev-tools/install-nginx-3.sh | 6 +++--- .dev-tools/install-nginx-4.sh | 11 +++++------ .dev-tools/run-curl-tests-testing-of-changes.sh | 10 ++++++++++ 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.dev-tools/install-nginx-1.sh b/.dev-tools/install-nginx-1.sh index 8a213249c..b92732ded 100755 --- a/.dev-tools/install-nginx-1.sh +++ b/.dev-tools/install-nginx-1.sh @@ -142,7 +142,7 @@ sudo bash ./update-ngxblocker -n # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************************************************* # Test that update-ngxblocker can install all missing required files by deleting some of them @@ -206,7 +206,7 @@ sudo bash ./setup-ngxblocker -x # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************* # Make sure we test latest generated globalblacklist.conf @@ -220,7 +220,7 @@ sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist.conf /etc/nginx/conf.d/global # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ********************** # Now Run our Curl Tests diff --git a/.dev-tools/install-nginx-2.sh b/.dev-tools/install-nginx-2.sh index 25053d961..de60213a3 100755 --- a/.dev-tools/install-nginx-2.sh +++ b/.dev-tools/install-nginx-2.sh @@ -157,7 +157,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' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************************************************* # Test that update-ngxblocker can install all missing required files by deleting some of them @@ -221,7 +221,7 @@ sudo bash ./setup-ngxblocker -x -c /usr/local/nginx/conf.d -b /usr/local/nginx/b # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************* # Make sure we test latest generated globalblacklist.conf @@ -243,7 +243,7 @@ sudo bash ./setup-ngxblocker -x -c /usr/local/nginx/conf.d -b /usr/local/nginx/b # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ********************** # Now Run our Curl Tests diff --git a/.dev-tools/install-nginx-3.sh b/.dev-tools/install-nginx-3.sh index a571fe356..4b0deea51 100755 --- a/.dev-tools/install-nginx-3.sh +++ b/.dev-tools/install-nginx-3.sh @@ -164,7 +164,7 @@ sudo bash ./update-ngxblocker -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d -n # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************************************************* # Test that update-ngxblocker can install all missing required files by deleting some of them @@ -228,7 +228,7 @@ sudo bash ./setup-ngxblocker -x -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************* # Make sure we test latest generated globalblacklist.conf @@ -250,7 +250,7 @@ sudo bash ./setup-ngxblocker -x -c /etc/nginx/myconf.d -b /etc/nginx/mybots.d # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ********************** # Now Run our Curl Tests diff --git a/.dev-tools/install-nginx-4.sh b/.dev-tools/install-nginx-4.sh index 6d444b46c..ac7d8c55e 100755 --- a/.dev-tools/install-nginx-4.sh +++ b/.dev-tools/install-nginx-4.sh @@ -69,8 +69,7 @@ sudo add-apt-repository -y ppa:nginx/${mainstreamnginx} sudo apt-get update sudo apt-get install -y --assume-yes nginx-full sudo nginx -V -sudo nginx -t -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ************************************** # Make Sure We Cleanup From Nginx Test 3 @@ -196,7 +195,7 @@ sudo bash ./update-ngxblocker -n # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************************************************* # Test that update-ngxblocker can install all missing required files by deleting some of them @@ -260,7 +259,7 @@ sudo bash ./setup-ngxblocker -x # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ******************************************************* # Make sure we test latest generated globalblacklist.conf @@ -282,10 +281,10 @@ sudo bash ./setup-ngxblocker -x # ********************* printf '\n%s\n%s\n%s\n\n' "########################" "Force Reloading of Nginx" "########################" -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/default13.vhost /etc/nginx/sites-available/default.vhost -sudo service nginx reload +sudo nginx -t && sudo nginx -s reload # ********************** # Now Run our Curl Tests diff --git a/.dev-tools/run-curl-tests-testing-of-changes.sh b/.dev-tools/run-curl-tests-testing-of-changes.sh index 4a6dab098..26703e91e 100644 --- a/.dev-tools/run-curl-tests-testing-of-changes.sh +++ b/.dev-tools/run-curl-tests-testing-of-changes.sh @@ -209,15 +209,25 @@ fi # Trigger our curl functions to run # ********************************* +echo "Test 1" run_curltest1 +echo "Test 2" run_curltest2 +echo "Test 3" run_curltest3 +echo "Test 4" run_curltest4 +echo "Test 5" run_curltest5 +echo "Test 6" run_curltest6 +echo "Test 6" run_curltest7 +echo "Test 8" run_curltest8 +echo "Test 9" run_curltest9 +echo "Test 10" run_curltest10 echo "Tests Completed"