Debug Nginx Build Tests

This commit is contained in:
Mitchell Krog 2019-06-20 15:05:53 +02:00
parent 46761975f4
commit bd94cecb0e
No known key found for this signature in database
GPG key ID: C243C388553EDE5D
6 changed files with 18 additions and 21 deletions

View file

@ -235,6 +235,7 @@ printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "###
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test1/nginx.conf
# *****************************************************************************************
# Travis now moves into running the rest of the tests in the script: section of .travis.yml

View file

@ -258,6 +258,7 @@ printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "###
sudo cp /usr/local/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/bots.d/
sudo cp /usr/local/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test2/nginx.conf
# *****************************************************************************************
# Travis now moves into running the rest of the tests in the script: section of .travis.yml

View file

@ -267,6 +267,7 @@ sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/
sudo cp /etc/nginx/mybots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/bots.d/
sudo cp /etc/nginx/myconf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test3/nginx.conf
# *****************************************************************************************
# Travis now moves into running the rest of the tests in the script: section of .travis.yml

View file

@ -301,6 +301,7 @@ sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_test4/nginx.conf
ls -la /etc/nginx/sites-available/
ls -la /var/www/
sudo chown -R travis:travis ${TRAVIS_BUILD_DIR}/

View file

@ -68,7 +68,7 @@ printf '\n%s\n%s\n%s\n\n' "######################" "Now Run our Curl Tests" "###
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/_conf_files_testing_changes/nginx.conf
# **********************
# Exit With Error Number

View file

@ -50,6 +50,8 @@ else
#exit 1
fi
}
run_curltest1
# **************************************************
# Function Curl Test 2 - Check for Bad Bot "Nutch"
@ -67,6 +69,8 @@ else
#exit 1
fi
}
run_curltest2
# ******************************************************************
# Function Curl Test 3 - Check for Bad Referrer "100dollars-seo.com"
@ -84,6 +88,8 @@ else
#exit 1
fi
}
run_curltest3
# ******************************************************
# Function Curl Test 4 - Check for Bad Referrer "zx6.ru"
@ -101,6 +107,7 @@ else
#exit 1
fi
}
run_curltest4
# *****************************************************
# Function Curl Test 5 - Check for Good Bot "GoogleBot"
@ -118,6 +125,7 @@ else
#exit 1
fi
}
run_curltest5
# ***************************************************
# Function Curl Test 6 - Check for Good Bot "BingBot"
@ -135,6 +143,7 @@ else
#exit 1
fi
}
run_curltest6
# ***********************************************************
# Function Curl Test 7 - Check for Good Referrer "google.com"
@ -152,6 +161,7 @@ else
#exit 1
fi
}
run_curltest7
# ***********************************************************
# Function Curl Test 8 - Check for Good Referrer "bing.com"
@ -170,6 +180,7 @@ else
#exit 1
fi
}
run_curltest8
# **************************************************
# Function Curl Test 9 - Check for Bad Bot "Nutch"
@ -187,6 +198,7 @@ else
#exit 1
fi
}
run_curltest9
# **************************************************
# Function Curl Test 10 - Check for Bad Bot "Nutch"
@ -204,31 +216,12 @@ else
#exit 1
fi
}
run_curltest10
# *********************************
# 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"