diff --git a/build.gradle b/build.gradle index 347609f..a869778 100644 --- a/build.gradle +++ b/build.gradle @@ -4,21 +4,8 @@ plugins { id 'io.freefair.lombok' version '6.4.1' } -test { - testLogging { - events 'passed', 'skipped', 'failed' - - showExceptions true - exceptionFormat 'full' - showCauses true - showStackTraces true - - showStandardStreams false - } -} - group 'es.sralloza' -version '0.3.3' +version '0.3.4' repositories { mavenCentral() @@ -66,15 +53,20 @@ dependencies { test { useJUnitPlatform() testLogging { + showExceptions = true + exceptionFormat = 'full' + showCauses = true + showStackTraces = true + showStandardStreams = false events "passed", "skipped", "failed" + + afterSuite { desc, result -> + if (!desc.parent) { // will match the outermost suite + println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)" + } + } + showStandardStreams = true } - testLogging { - afterSuite { desc, result -> - if (!desc.parent) { // will match the outermost suite - println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)" - } - } - } } compileJava.options.encoding = 'UTF-8' diff --git a/delivery/Dockerfile b/delivery/Dockerfile index b16fa64..127216e 100644 --- a/delivery/Dockerfile +++ b/delivery/Dockerfile @@ -6,9 +6,10 @@ COPY gradle/ /home/gradle/gradle/ COPY build.gradle settings.gradle gradlew /home/gradle/ COPY src/ /home/gradle/src/ -# RUN ./gradlew build -# RUN ./gradlew test --scan -RUN ./gradlew clean test --console verbose +ARG TARGETARCH + +# XXX: Skip tests for ARMv7. Tests with MockWebServer fail on shutdown with "java.io.IOException: Gave up waiting for queue to shut down" only on ARMv7. +RUN if [ "${TARGETARCH}" != "arm" ]; then ./gradlew clean test --console verbose; else echo "Skipping tests for ARMv7"; fi RUN ./gradlew jar FROM sralloza/openjdk:11-jre diff --git a/src/main/java/bot/ChoreManagementBot.java b/src/main/java/bot/ChoreManagementBot.java index dde7b45..2415102 100644 --- a/src/main/java/bot/ChoreManagementBot.java +++ b/src/main/java/bot/ChoreManagementBot.java @@ -180,6 +180,9 @@ private void processMsg(MessageContext ctx) { case UserMessages.UNSKIP: silent.forceReply(BotMessages.ASK_FOR_WEEK_TO_UNSKIP, ctx.chatId()); break; + case UserMessages.TRANSFER: + helper.sendMessage(BotMessages.NOT_IMPLEMENTED, chatId, true); + break; default: helper.sendMessage(BotMessages.UNDEFINED_COMMAND, chatId, true); break; diff --git a/src/main/java/constants/BotMessages.java b/src/main/java/constants/BotMessages.java index d2fc9ef..94c04d6 100644 --- a/src/main/java/constants/BotMessages.java +++ b/src/main/java/constants/BotMessages.java @@ -17,6 +17,8 @@ public class BotMessages { " informaciĆ³n al administrador para resolver el problema\\."; public static final String NO_TICKETS_FOUND = "No se han encontrado tickets"; + public static final String NOT_IMPLEMENTED = "Comando no implementado"; + public static final String WEEK_SKIPPED = "Semana saltada: %s"; public static final String WEEK_UNSKIPPED = "Semana restaurada: %s";