run curl in lxc

This commit is contained in:
Kay0u 2021-10-13 14:56:26 +02:00
parent 5c42ae0774
commit 9f6cc8dceb
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -187,16 +187,18 @@ _VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
log_debug "Running curl $check_domain$curl_check_path" log_debug "Running curl $check_domain$curl_check_path"
# Call cURL to try to access to the URL of the app # Call cURL to try to access to the URL of the app
curl --location --insecure --silent --show-error \ LXC_EXEC "curl --location --insecure --silent --show-error \
--header "Host: $check_domain" \ --header 'Host: $check_domain' \
--resolve $DOMAIN:80:$LXC_IP \ --resolve $DOMAIN:80:$LXC_IP \
--resolve $DOMAIN:443:$LXC_IP \ --resolve $DOMAIN:443:$LXC_IP \
--resolve $SUBDOMAIN:80:$LXC_IP \ --resolve $SUBDOMAIN:80:$LXC_IP \
--resolve $SUBDOMAIN:443:$LXC_IP \ --resolve $SUBDOMAIN:443:$LXC_IP \
--write-out "%{http_code};%{url_effective}\n" \ --write-out '%{http_code};%{url_effective}\n' \
--output "$curl_output" \ --output './curl_output' \
$check_domain$curl_check_path \ $check_domain$curl_check_path" \
> "$TEST_CONTEXT/curl_print" > "$TEST_CONTEXT/curl_print"
LXC_EXEC "cat ./curl_output" > $curl_output
# Analyze the result of curl command # Analyze the result of curl command
if [ $? -ne 0 ] if [ $? -ne 0 ]