From 91094dbf3d75ba2fd25cd5789dacb56649bc33b8 Mon Sep 17 00:00:00 2001 From: GordeaS Date: Mon, 18 Mar 2024 14:07:20 +0100 Subject: [PATCH] enable logging for integration testing (log4j2-spring.xml is not in the ignored resources) --- .../set/integration/BaseUserSetTestUtils.java | 3 +- .../resources/log4j2-spring.xml | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 set-integration-testing/src/integration-test/resources/log4j2-spring.xml diff --git a/set-integration-testing/src/integration-test/java/eu/europeana/api/set/integration/BaseUserSetTestUtils.java b/set-integration-testing/src/integration-test/java/eu/europeana/api/set/integration/BaseUserSetTestUtils.java index 8e3181d6..9825ea57 100644 --- a/set-integration-testing/src/integration-test/java/eu/europeana/api/set/integration/BaseUserSetTestUtils.java +++ b/set-integration-testing/src/integration-test/java/eu/europeana/api/set/integration/BaseUserSetTestUtils.java @@ -133,7 +133,8 @@ public abstract class BaseUserSetTestUtils { static { // MONGO_CONTAINER = new MongoDBContainer("mongo:6.0.14-jammy") - MONGO_CONTAINER = new MongoContainer("set-api-test") + final String serviceDB = "admin"; // to change to "set-api-test" + MONGO_CONTAINER = new MongoContainer(serviceDB) .withLogConsumer(new WaitingConsumer() .andThen(new ToStringConsumer())); diff --git a/set-integration-testing/src/integration-test/resources/log4j2-spring.xml b/set-integration-testing/src/integration-test/resources/log4j2-spring.xml new file mode 100644 index 00000000..c5f2cf8a --- /dev/null +++ b/set-integration-testing/src/integration-test/resources/log4j2-spring.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +