From 0087c44a342eb8d14eca653b7cbd949c0126a256 Mon Sep 17 00:00:00 2001
From: latlon team <info@lat-lon.de>
Date: Sat, 18 Jan 2025 20:16:55 +0000
Subject: [PATCH] Code drop

- XPLANBOX-3614/-3609 - fixed sripts executing integration and soapui tests (f5023ece5)
- XPLANBOX-3613 - disabled appending of X-Forwarded header (92191e885)

Co-authored-by: Lyn Elisa Goltz <goltz@lat-lon.de>

Dropped from commit: bf50c83af3aae502056ca58303c61bcd342bb0b5
---
 .../src/main/resources/application.properties      |  4 ++++
 .../runAllIntegrationTests.sh                      | 14 +++++++++-----
 .../xplan-tests-soapui/runAllSoapUiTests.sh        |  8 ++++----
 3 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/xplan-gateway/src/main/resources/application.properties b/xplan-gateway/src/main/resources/application.properties
index 3d70aee39..fccf8cdd9 100644
--- a/xplan-gateway/src/main/resources/application.properties
+++ b/xplan-gateway/src/main/resources/application.properties
@@ -31,4 +31,8 @@ xplanbox.gateway.rewrite.backend.xplan-mapproxy.uri=${XPLAN_MAPPROXY_URL_INTERNA
 xplanbox.gateway.rewrite.backend.xplan-services.uri=${XPLAN_SERVICES_URL_INTERNAL:http://xplan-services}
 xplanbox.gateway.rewrite.backend.xplan-validator-wms.uri=${XPLAN_VALIDATOR_WMS_URL_INTERNAL:http://xplan-validator-wms}
 
+spring.cloud.gateway.x-forwarded.host-append=false
+spring.cloud.gateway.x-forwarded.port-append=false
+spring.cloud.gateway.x-forwarded.proto-append=false
+
 spring.codec.max-in-memory-size: 1000KB
diff --git a/xplan-tests/xplan-tests-integration/runAllIntegrationTests.sh b/xplan-tests/xplan-tests-integration/runAllIntegrationTests.sh
index a9130ba6e..38ae8969e 100755
--- a/xplan-tests/xplan-tests-integration/runAllIntegrationTests.sh
+++ b/xplan-tests/xplan-tests-integration/runAllIntegrationTests.sh
@@ -30,12 +30,16 @@ function waitForRightVersion() {
   			sleep $((sleepDuration))s
 		fi
 	done
-	
+
 	echo "  [failed]"
 	return 2
 }
 ############################################
 
+if [ -n "$XPLAN_NOTIFY_SLACK_CHANNEL" ] &&  [ -n "$XPLAN_NOTIFY_SLACK_TOKEN" ]; then
+	sendSlackMessage "Starting Integration tests..."
+fi
+
 echo "Waiting for services with git revision $GIT_REVISION:"
 waitForRightVersion $XPLAN_DOKUMENTEAPI_URL_PUBLIC/actuator/info
 waitForRightVersion $XPLAN_MANAGERAPI_URL_PUBLIC/actuator/info
@@ -55,10 +59,10 @@ mvn surefire-report:failsafe-report-only -q
 
 REPORT_PATH_PDF=target/test-report.pdf
 echo "Transforming to PDF $REPORT_PATH_PDF..."
-sed -i 's/display:none;//' target/site/failsafe-report.html
-weasyprint file://$PWD/target/site/failsafe-report.html $REPORT_PATH_PDF
+sed -i 's/display:none;//' target/reports/failsafe.html
+weasyprint file://$PWD/target/reports/failsafe.html $REPORT_PATH_PDF
 REPORT_PATH_TAR=target/test-report.tar.gz
-tar cfz $REPORT_PATH_TAR -C target site failsafe-reports
+tar cfz $REPORT_PATH_TAR -C target reports failsafe-reports
 
 if [ "$XPLAN_UPLOAD_TEST_REPORT" = "true" ];
 then
@@ -81,7 +85,7 @@ fi
 
 if [ -n "$XPLAN_NOTIFY_SLACK_CHANNEL" ] &&  [ -n "$XPLAN_NOTIFY_SLACK_TOKEN" ]; then
 	echo "Sending slack notification to $XPLAN_NOTIFY_SLACK_CHANNEL"
-	message="Finished Selenium tests"
+	message="Finished Integration tests"
 	if [ -n "$S3_PATH_PDF" ]; then
 		message="$message%0A%0A\
 Get test reports from S3 bucket with:%0A\
diff --git a/xplan-tests/xplan-tests-soapui/runAllSoapUiTests.sh b/xplan-tests/xplan-tests-soapui/runAllSoapUiTests.sh
index d14dd0937..e9075610f 100755
--- a/xplan-tests/xplan-tests-soapui/runAllSoapUiTests.sh
+++ b/xplan-tests/xplan-tests-soapui/runAllSoapUiTests.sh
@@ -35,7 +35,7 @@ function waitForRightVersion() {
   			sleep $((sleepDuration))s
 		fi
 	done
-	
+
 	echo "  [failed]"
 	return 2
 }
@@ -111,10 +111,10 @@ mvn surefire-report:report-only -q
 
 REPORT_PATH_PDF=target/test-report.pdf
 echo "Transforming to PDF $REPORT_PATH_PDF..."
-sed -i 's/display:none;//' target/site/surefire-report.html
-weasyprint file://$PWD/target/site/surefire-report.html $REPORT_PATH_PDF
+sed -i 's/display:none;//' target/reports/surefire.html
+weasyprint file://$PWD/target/reports/surefire.html $REPORT_PATH_PDF
 REPORT_PATH_TAR=target/test-report.tar.gz
-tar cfz $REPORT_PATH_TAR -C target site soapui
+tar cfz $REPORT_PATH_TAR -C target reports soapui
 
 if [ "$XPLAN_UPLOAD_TEST_REPORT" = "true" ];
 then
-- 
GitLab