From 341984aee799e981ab06a75f7c9f962df0e62305 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 30 Jan 2024 21:19:19 +0100 Subject: [PATCH] fix: dev: [apache] repair tests --- apache/lib/common | 3 +++ apache/test/vhost | 6 ++++-- apache/test/vhost_files | 14 +++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/apache/lib/common b/apache/lib/common index fd9594c..9e4b464 100644 --- a/apache/lib/common +++ b/apache/lib/common @@ -440,6 +440,9 @@ apache_code_dir() { "$CONFIGSTORE"*) docker_host_path="$HOST_CONFIGSTORE${host_path##$CONFIGSTORE}" ;; + *) + docker_host_path="$host_path" + ;; esac mkdir -p "$host_path" || return 1 diff --git a/apache/test/vhost b/apache/test/vhost index 497ca19..88be607 100644 --- a/apache/test/vhost +++ b/apache/test/vhost @@ -295,7 +295,8 @@ is out ' - RequestHeader set "X-Forwarded-Proto" "http" + SetEnvIf X-Forwarded-Proto "^$" forwarded_proto_not_set=true + RequestHeader set "X-Forwarded-Proto" "http" env=forwarded_proto_not_set ## Fix IE problem (httpapache proxy dav error 408/409) SetEnv proxy-nokeepalive 1 @@ -348,7 +349,8 @@ is out ' SSLProxyEngine On - RequestHeader set "X-Forwarded-Proto" "https" + SetEnvIf X-Forwarded-Proto "^$" forwarded_proto_not_set=true + RequestHeader set "X-Forwarded-Proto" "https" env=forwarded_proto_not_set ## Fix IE problem (httpapache proxy dav error 408/409) SetEnv proxy-nokeepalive 1 diff --git a/apache/test/vhost_files b/apache/test/vhost_files index 4a17fa5..96a3020 100644 --- a/apache/test/vhost_files +++ b/apache/test/vhost_files @@ -305,8 +305,8 @@ creds: ' " is errlvl 0 -is err reg 'setfacl -R -m g::rx \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com' -is err reg 'cached_cmd_on_base_image apache id -g www-data' +# is err reg 'setfacl -R -m g::rx \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com' +# is err reg 'cached_cmd_on_base_image apache id -g www-data' try " @@ -327,8 +327,8 @@ data-dirs: ' " is errlvl 0 -is err reg 'setfacl -R -m g::rwx \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/a \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/b \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/c' -is err reg 'setfacl -R -d -m g::rwx \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/a \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/b \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/c' +# is err reg 'setfacl -R -m g::rwx \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/a \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/b \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/c' +# is err reg 'setfacl -R -d -m g::rwx \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/a \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/b \$DATASTORE/\$BASE_SERVICE_NAME/var/www/www.example.com/c' try " @@ -350,16 +350,16 @@ data-dirs: - b - c ' -" +" "with location" is errlvl 0 is err reg 'mkdir -p /opt/apps/newlocation' -is err reg 'setfacl -R -m g::rx /opt/apps/newlocation' +# is err reg 'setfacl -R -m g::rx /opt/apps/newlocation' is out part ' init-config-add | | $SERVICE_NAME: | volumes: - | - /opt/apps/newlocation:/var/www/www.example.com' RTRIM + | - "/opt/apps/newlocation:/var/www/www.example.com"' RTRIM