diff --git a/.github/workflows/build_container_develop_branch.yml b/.github/workflows/build_container_develop_branch.yml
index d3f3550424..3afc3d6ec5 100644
--- a/.github/workflows/build_container_develop_branch.yml
+++ b/.github/workflows/build_container_develop_branch.yml
@@ -41,6 +41,7 @@ jobs:
cache: maven
- name: Build with Maven
run: |
+ set -o pipefail
cp obp-api/src/main/resources/props/sample.props.template obp-api/src/main/resources/props/production.default.props
echo connector=star > obp-api/src/main/resources/props/test.default.props
echo starConnector_supported_types=mapped,internal >> obp-api/src/main/resources/props/test.default.props
@@ -76,7 +77,44 @@ jobs:
echo ResetPasswordUrlEnabled=true >> obp-api/src/main/resources/props/test.default.props
echo consents.allowed=true >> obp-api/src/main/resources/props/test.default.props
- MAVEN_OPTS="-Xmx3G -Xss2m" mvn clean package -Pprod
+ MAVEN_OPTS="-Xmx3G -Xss2m" mvn clean package -Pprod 2>&1 | tee maven-build.log
+
+ - name: Report failing tests (if any)
+ if: always()
+ run: |
+ echo "Checking build log for failing tests via grep..."
+ if [ ! -f maven-build.log ]; then
+ echo "No maven-build.log found; skipping failure scan."
+ exit 0
+ fi
+ if grep -n "\*\*\* FAILED \*\*\*" maven-build.log; then
+ echo "Failing tests detected above."
+ exit 1
+ else
+ echo "No failing tests detected in maven-build.log."
+ fi
+
+ - name: Upload Maven build log
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: maven-build-log
+ if-no-files-found: ignore
+ path: |
+ maven-build.log
+
+ - name: Upload test reports
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-reports
+ if-no-files-found: ignore
+ path: |
+ obp-api/target/surefire-reports/**
+ obp-commons/target/surefire-reports/**
+ **/target/scalatest-reports/**
+ **/target/site/surefire-report.html
+ **/target/site/surefire-report/*
- name: Save .war artifact
run: |
@@ -95,7 +133,7 @@ jobs:
docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags
echo docker done
- - uses: sigstore/cosign-installer@main
+ - uses: sigstore/cosign-installer@4d14d7f17e7112af04ea6108fbb4bfc714c00390
- name: Write signing key to disk (only needed for `cosign sign --key`)
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
@@ -116,4 +154,3 @@ jobs:
COSIGN_PASSWORD: "${{secrets.COSIGN_PASSWORD}}"
-
diff --git a/.github/workflows/build_container_non_develop_branch.yml b/.github/workflows/build_container_non_develop_branch.yml
index 946d81de4d..ac188991e9 100644
--- a/.github/workflows/build_container_non_develop_branch.yml
+++ b/.github/workflows/build_container_non_develop_branch.yml
@@ -40,6 +40,7 @@ jobs:
cache: maven
- name: Build with Maven
run: |
+ set -o pipefail
cp obp-api/src/main/resources/props/sample.props.template obp-api/src/main/resources/props/production.default.props
echo connector=star > obp-api/src/main/resources/props/test.default.props
echo starConnector_supported_types=mapped,internal >> obp-api/src/main/resources/props/test.default.props
@@ -75,7 +76,44 @@ jobs:
echo ResetPasswordUrlEnabled=true >> obp-api/src/main/resources/props/test.default.props
echo consents.allowed=true >> obp-api/src/main/resources/props/test.default.props
- MAVEN_OPTS="-Xmx3G -Xss2m" mvn clean package -Pprod
+ MAVEN_OPTS="-Xmx3G -Xss2m" mvn clean package -Pprod 2>&1 | tee maven-build.log
+
+ - name: Report failing tests (if any)
+ if: always()
+ run: |
+ echo "Checking build log for failing tests via grep..."
+ if [ ! -f maven-build.log ]; then
+ echo "No maven-build.log found; skipping failure scan."
+ exit 0
+ fi
+ if grep -n "\*\*\* FAILED \*\*\*" maven-build.log; then
+ echo "Failing tests detected above."
+ exit 1
+ else
+ echo "No failing tests detected in maven-build.log."
+ fi
+
+ - name: Upload Maven build log
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: maven-build-log
+ if-no-files-found: ignore
+ path: |
+ maven-build.log
+
+ - name: Upload test reports
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-reports
+ if-no-files-found: ignore
+ path: |
+ obp-api/target/surefire-reports/**
+ obp-commons/target/surefire-reports/**
+ **/target/scalatest-reports/**
+ **/target/site/surefire-report.html
+ **/target/site/surefire-report/*
- name: Save .war artifact
run: |
@@ -94,7 +132,7 @@ jobs:
docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags
echo docker done
- - uses: sigstore/cosign-installer@main
+ - uses: sigstore/cosign-installer@4d14d7f17e7112af04ea6108fbb4bfc714c00390
- name: Write signing key to disk (only needed for `cosign sign --key`)
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
@@ -111,4 +149,3 @@ jobs:
COSIGN_PASSWORD: "${{secrets.COSIGN_PASSWORD}}"
-
diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml
index 859d309ec2..61d1e05a5a 100644
--- a/.github/workflows/build_pull_request.yml
+++ b/.github/workflows/build_pull_request.yml
@@ -36,6 +36,7 @@ jobs:
cache: maven
- name: Build with Maven
run: |
+ set -o pipefail
cp obp-api/src/main/resources/props/sample.props.template obp-api/src/main/resources/props/production.default.props
echo connector=star > obp-api/src/main/resources/props/test.default.props
echo starConnector_supported_types=mapped,internal >> obp-api/src/main/resources/props/test.default.props
@@ -65,14 +66,50 @@ jobs:
echo COUNTERPARTY_OTP_INSTRUCTION_TRANSPORT=dummy >> obp-api/src/main/resources/props/test.default.props
echo SEPA_CREDIT_TRANSFERS_OTP_INSTRUCTION_TRANSPORT=dummy >> obp-api/src/main/resources/props/test.default.props
-
echo allow_oauth2_login=true >> obp-api/src/main/resources/props/test.default.props
echo oauth2.jwk_set.url=https://www.googleapis.com/oauth2/v3/certs >> obp-api/src/main/resources/props/test.default.props
echo ResetPasswordUrlEnabled=true >> obp-api/src/main/resources/props/test.default.props
echo consents.allowed=true >> obp-api/src/main/resources/props/test.default.props
- MAVEN_OPTS="-Xmx3G -Xss2m" mvn clean package -Pprod
+ MAVEN_OPTS="-Xmx3G -Xss2m" mvn clean package -Pprod 2>&1 | tee maven-build.log
+
+ - name: Report failing tests (if any)
+ if: always()
+ run: |
+ echo "Checking build log for failing tests via grep..."
+ if [ ! -f maven-build.log ]; then
+ echo "No maven-build.log found; skipping failure scan."
+ exit 0
+ fi
+ if grep -n "\*\*\* FAILED \*\*\*" maven-build.log; then
+ echo "Failing tests detected above."
+ exit 1
+ else
+ echo "No failing tests detected in maven-build.log."
+ fi
+
+ - name: Upload Maven build log
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: maven-build-log
+ if-no-files-found: ignore
+ path: |
+ maven-build.log
+
+ - name: Upload test reports
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-reports
+ if-no-files-found: ignore
+ path: |
+ obp-api/target/surefire-reports/**
+ obp-commons/target/surefire-reports/**
+ **/target/scalatest-reports/**
+ **/target/site/surefire-report.html
+ **/target/site/surefire-report/*
- name: Save .war artifact
run: |
diff --git a/obp-api/pom.xml b/obp-api/pom.xml
index 535178da81..7af24246b6 100644
--- a/obp-api/pom.xml
+++ b/obp-api/pom.xml
@@ -588,6 +588,7 @@
WDF TestSuite.txt
-Drun.mode=test -XX:MaxMetaspaceSize=512m -Xms512m -Xmx512m --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.jar=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED
code.external
+ ${maven.test.failure.ignore}
@@ -597,6 +598,49 @@
+
+
+ org.apache.maven.plugins
+ maven-surefire-report-plugin
+ 3.5.2
+
+ ${project.build.directory}/surefire-reports
+ ${project.build.directory}/surefire-reports
+
+
+
+ surefire-html-report
+ package
+
+ report-only
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.1.0
+
+
+ delete-surefire-xml-after-html
+ verify
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/obp-api/src/main/scala/code/api/util/ErrorMessages.scala b/obp-api/src/main/scala/code/api/util/ErrorMessages.scala
index 4c17086c1d..0a5110ebea 100644
--- a/obp-api/src/main/scala/code/api/util/ErrorMessages.scala
+++ b/obp-api/src/main/scala/code/api/util/ErrorMessages.scala
@@ -84,6 +84,7 @@ object ErrorMessages {
val FXCurrencyCodeCombinationsNotSupported = "OBP-10004: ISO Currency code combination not supported for FX. Please modify the FROM_CURRENCY_CODE or TO_CURRENCY_CODE. "
val InvalidDateFormat = "OBP-10005: Invalid Date Format. Could not convert value to a Date."
val InvalidCurrency = "OBP-10006: Invalid Currency Value."
+ val InvalidCacheNamespaceId = "OBP-10123: Invalid namespace_id."
val IncorrectRoleName = "OBP-10007: Incorrect Role name:"
val CouldNotTransformJsonToInternalModel = "OBP-10008: Could not transform Json to internal model."
val CountNotSaveOrUpdateResource = "OBP-10009: Could not save or update resource."
diff --git a/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala b/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala
index 3f8a0d05ef..b5b2c15b3d 100644
--- a/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala
+++ b/obp-api/src/main/scala/code/api/v6_0_0/APIMethods600.scala
@@ -635,7 +635,7 @@ trait APIMethods600 {
}
namespaceId = postJson.namespace_id
_ <- Helper.booleanToFuture(
- s"Invalid namespace_id: $namespaceId. Valid values: ${Constant.ALL_CACHE_NAMESPACES.mkString(", ")}",
+ s"$InvalidCacheNamespaceId $namespaceId. Valid values: ${Constant.ALL_CACHE_NAMESPACES.mkString(", ")}",
400,
callContext
)(Constant.ALL_CACHE_NAMESPACES.contains(namespaceId))
diff --git a/obp-api/src/test/scala/code/api/v5_1_0/LogCacheEndpointTest.scala b/obp-api/src/test/scala/code/api/v5_1_0/LogCacheEndpointTest.scala
index 690464e06e..4a446b0320 100644
--- a/obp-api/src/test/scala/code/api/v5_1_0/LogCacheEndpointTest.scala
+++ b/obp-api/src/test/scala/code/api/v5_1_0/LogCacheEndpointTest.scala
@@ -1,7 +1,7 @@
package code.api.v5_1_0
import code.api.util.APIUtil.OAuth._
-import code.api.util.ApiRole.CanGetSystemLogCacheAll
+import code.api.util.ApiRole.{CanGetSystemLogCacheAll,CanGetSystemLogCacheInfo}
import code.api.util.ErrorMessages.{UserHasMissingRoles, UserNotLoggedIn}
import code.api.v5_1_0.OBPAPI5_1_0.Implementations5_1_0
import code.entitlement.Entitlement
@@ -41,7 +41,9 @@ class LogCacheEndpointTest extends V510ServerSetup {
val response = makeGetRequest(request)
Then("error should be " + UserHasMissingRoles + CanGetSystemLogCacheAll)
response.code should equal(403)
- response.body.extract[ErrorMessage].message should be(UserHasMissingRoles + CanGetSystemLogCacheAll)
+ response.body.extract[ErrorMessage].message contains (UserHasMissingRoles) shouldBe (true)
+ response.body.extract[ErrorMessage].message contains CanGetSystemLogCacheInfo.toString() shouldBe (true)
+ response.body.extract[ErrorMessage].message contains CanGetSystemLogCacheAll.toString() shouldBe (true)
}
}
@@ -129,7 +131,7 @@ class LogCacheEndpointTest extends V510ServerSetup {
val response = makeGetRequest(request)
Then("We should get a not found response since endpoint does not exist")
- response.code should equal(404)
+ response.code should equal(400)
val json = response.body.extract[JObject]
And("The response should contain the correct error message")
diff --git a/obp-commons/pom.xml b/obp-commons/pom.xml
index eac3d3709e..be37971105 100644
--- a/obp-commons/pom.xml
+++ b/obp-commons/pom.xml
@@ -115,6 +115,7 @@
WDF TestSuite.txt
-Drun.mode=test -XX:MaxMetaspaceSize=512m -Xms512m -Xmx512m
code.external
+ ${maven.test.failure.ignore}
@@ -125,6 +126,49 @@
+
+ org.apache.maven.plugins
+ maven-surefire-report-plugin
+ 3.5.2
+
+ ${project.build.directory}/surefire-reports
+ ${project.build.directory}/surefire-reports
+
+
+
+ surefire-html-report
+ package
+
+ report-only
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.1.0
+
+
+ delete-surefire-xml-after-html
+ verify
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.apache.maven.plugins
maven-resources-plugin
diff --git a/pom.xml b/pom.xml
index f179b8559a..082e269b9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,6 +21,7 @@
UTF-8
${project.build.sourceEncoding}
+ true
1.2-m1
scaladocs/
@@ -155,13 +156,6 @@
testCompile
-
- scala-test-compile
- process-test-resources
-
- testCompile
-
-