update the host files to point to accessible docker container names for backends
added testing for this, including mock backend server.
This commit is contained in:
@@ -28,24 +28,25 @@ build() {
|
||||
build_test() {
|
||||
echo -e "\e[33mtesting the image\e[39m"
|
||||
|
||||
dc up -d
|
||||
dc up -d --force-recreate
|
||||
docker ps | grep sslproxy
|
||||
|
||||
sleep 2
|
||||
assertBadGateway https abcapi.xai-corp.net
|
||||
assertBadGateway https dkui.xai-corp.net
|
||||
assertBadGateway https git.xai-corp.net
|
||||
assertBadGateway https jenkins.xai-corp.net
|
||||
assertBadGateway https xaibox.xai-corp.net
|
||||
assertBadGateway https metrics.xai-corp.net
|
||||
sleep 5
|
||||
assertTeapot https abcapi.xai-corp.net
|
||||
assertTeapot https dkui.xai-corp.net
|
||||
assertTeapot https git.xai-corp.net
|
||||
assertTeapot https jenkins.xai-corp.net
|
||||
assertTeapot https xaibox.xai-corp.net
|
||||
assertMisdirectedRequest https not.xai-corp.net
|
||||
assertBadGateway http xai-corp.net
|
||||
assertBadGateway http abcapi.xai-corp.net
|
||||
assertBadGateway http dkui.xai-corp.net
|
||||
assertBadGateway http git.xai-corp.net
|
||||
assertBadGateway http jenkins.xai-corp.net
|
||||
assertBadGateway http xaibox.xai-corp.net
|
||||
assertBadGateway http metrics.xai-corp.net
|
||||
|
||||
#cert renewal
|
||||
assertTeapot http xai-corp.net
|
||||
assertTeapot http abcapi.xai-corp.net
|
||||
assertTeapot http dkui.xai-corp.net
|
||||
assertTeapot http git.xai-corp.net
|
||||
assertTeapot http jenkins.xai-corp.net
|
||||
assertTeapot http xaibox.xai-corp.net
|
||||
assertTeapot http metrics.xai-corp.net
|
||||
}
|
||||
|
||||
function assertMisdirectedRequest() {
|
||||
@@ -53,7 +54,7 @@ function assertMisdirectedRequest() {
|
||||
domain=$2
|
||||
set -e
|
||||
echo -e "\033[94m${proto}://${domain}\033[39m testing for mistrected request"
|
||||
curl --no-progress-meter -skH "Host: ${domain}" "${proto}://localhost" | tee "$LOG" | grep "421 Misdirected Request"
|
||||
curl --no-progress-meter -IskH "Host: ${domain}" "${proto}://localhost" | tee "$LOG" | grep "421 Misdirected Request"
|
||||
}
|
||||
|
||||
function assertBadGateway() {
|
||||
@@ -61,7 +62,16 @@ function assertBadGateway() {
|
||||
domain=$2
|
||||
set -e
|
||||
echo -e "\033[94m${proto}://${domain}\033[39m"
|
||||
curl --no-progress-meter -skH "Host: ${domain}" "${proto}://localhost" | tee "$LOG" | grep "502 Bad Gateway"
|
||||
curl --no-progress-meter -IskH "Host: ${domain}" "${proto}://localhost" | tee "$LOG" | grep "502 Bad Gateway"
|
||||
}
|
||||
|
||||
|
||||
function assertTeapot() {
|
||||
proto=$1
|
||||
domain=$2
|
||||
set -e
|
||||
echo -e "\033[94m${proto}://${domain}\033[39m"
|
||||
curl --no-progress-meter -IskH "Host: ${domain}" "${proto}://localhost" | tee "$LOG" | grep "418"
|
||||
}
|
||||
|
||||
build_save() {
|
||||
|
||||
Reference in New Issue
Block a user