From 1c3ec541d89105433e21e81bd5205bccb6509fcc Mon Sep 17 00:00:00 2001 From: Kristof Jozsa Date: Thu, 14 Nov 2024 15:17:36 +0100 Subject: [PATCH] remaining misc errors --- custom/acme/loan/job/build.gradle | 19 +++++++- custom/acme/loan/starter/build.gradle | 18 ++++++- fineract-e2e-tests-core/build.gradle | 48 +++++++++++++++---- ...tePlatformServiceRangeChangeEventTest.java | 3 -- integration-tests/build.gradle | 28 +++++++++-- 5 files changed, 98 insertions(+), 18 deletions(-) diff --git a/custom/acme/loan/job/build.gradle b/custom/acme/loan/job/build.gradle index d39a7293e51..b8296a482d8 100644 --- a/custom/acme/loan/job/build.gradle +++ b/custom/acme/loan/job/build.gradle @@ -23,14 +23,22 @@ group = 'com.acme.fineract' archivesBaseName = 'acme-fineract-loan-job' apply plugin: 'java' -apply plugin: 'org.springframework.boot' apply plugin: 'io.freefair.lombok' +apply plugin: 'io.spring.dependency-management' dependencies { + annotationProcessor( + 'org.projectlombok:lombok', + 'org.mapstruct:mapstruct-processor', + 'org.springframework.boot:spring-boot-configuration-processor' + ) + implementation( project(':fineract-core'), project(':fineract-loan'), - project(':custom:acme:loan:starter') + project(':custom:acme:loan:starter'), + 'org.springframework.boot:spring-boot-starter', + 'org.mapstruct:mapstruct' ) testImplementation( @@ -40,4 +48,11 @@ dependencies { ) } +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} + apply from: 'dependencies.gradle' diff --git a/custom/acme/loan/starter/build.gradle b/custom/acme/loan/starter/build.gradle index 935a14b5ee6..200b323e402 100644 --- a/custom/acme/loan/starter/build.gradle +++ b/custom/acme/loan/starter/build.gradle @@ -27,9 +27,18 @@ apply plugin: 'io.freefair.lombok' apply plugin: 'io.spring.dependency-management' dependencies { + annotationProcessor( + 'org.projectlombok:lombok', + 'org.mapstruct:mapstruct-processor', + 'org.springframework.boot:spring-boot-configuration-processor' + ) + implementation( project(':fineract-core'), - project(':fineract-loan') + project(':fineract-loan'), + project(':custom:acme:loan:processor'), + 'org.springframework.boot:spring-boot-starter', + 'org.mapstruct:mapstruct' ) testImplementation( @@ -39,4 +48,11 @@ dependencies { ) } +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} + apply from: 'dependencies.gradle' diff --git a/fineract-e2e-tests-core/build.gradle b/fineract-e2e-tests-core/build.gradle index e70e03cf954..14bd5530cfa 100644 --- a/fineract-e2e-tests-core/build.gradle +++ b/fineract-e2e-tests-core/build.gradle @@ -21,13 +21,44 @@ plugins { id 'java' } +description = 'Fineract E2E Tests Core' + +apply plugin: 'io.freefair.lombok' +apply plugin: 'io.spring.dependency-management' + repositories { mavenCentral() } dependencies { + annotationProcessor( + 'org.projectlombok:lombok', + 'org.mapstruct:mapstruct-processor' + ) + + testAnnotationProcessor( + 'org.projectlombok:lombok', + 'org.mapstruct:mapstruct-processor' + ) + + implementation( + project(':fineract-client'), + 'io.cucumber:cucumber-java', + 'io.cucumber:cucumber-junit', + 'io.cucumber:cucumber-spring', + 'org.springframework.boot:spring-boot-starter-test', + 'org.apache.commons:commons-lang3', + 'com.google.code.gson:gson', + 'org.awaitility:awaitility' + ) + + testImplementation( + 'org.junit.jupiter:junit-jupiter', + 'org.mockito:mockito-core', + 'org.mockito:mockito-junit-jupiter' + ) + testImplementation(project(':fineract-avro-schemas')) - testImplementation(project(':fineract-client')) testImplementation 'org.springframework:spring-context' implementation 'org.springframework:spring-test' @@ -37,19 +68,11 @@ dependencies { testImplementation 'com.squareup.retrofit2:retrofit:2.11.0' testImplementation 'commons-httpclient:commons-httpclient:3.1' - testImplementation 'org.apache.commons:commons-lang3:3.17.0' testImplementation 'com.googlecode.json-simple:json-simple:1.1.1' - testImplementation 'com.google.code.gson:gson:2.11.0' - - testImplementation 'io.cucumber:cucumber-java:7.20.1' - testImplementation 'io.cucumber:cucumber-junit:7.20.1' - testImplementation 'io.cucumber:cucumber-spring:7.20.1' testImplementation 'io.qameta.allure:allure-cucumber7-jvm:2.29.0' testImplementation 'org.assertj:assertj-core:3.26.3' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.3' - testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3' testImplementation "ch.qos.logback:logback-core:1.5.12" testImplementation "ch.qos.logback:logback-classic:1.5.12" @@ -62,6 +85,13 @@ dependencies { testImplementation 'org.apache.commons:commons-collections4:4.4' } +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} + tasks.withType(JavaCompile).configureEach { options.compilerArgs.add("-parameters") } diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/DelinquencyWritePlatformServiceRangeChangeEventTest.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/DelinquencyWritePlatformServiceRangeChangeEventTest.java index 7524a9248be..863cda71b66 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/DelinquencyWritePlatformServiceRangeChangeEventTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/DelinquencyWritePlatformServiceRangeChangeEventTest.java @@ -579,9 +579,6 @@ public void givenLoanAccountEnableInstallmentLevelDelinquencyWhenLoanIsOutOfDeli range1.setId(1L); DelinquencyRange range2 = DelinquencyRange.instance("Range30", 3, 30); range2.setId(2L); - List listDelinquencyRanges = Arrays.asList(range1, range2); - DelinquencyBucket delinquencyBucket = new DelinquencyBucket("test Bucket"); - delinquencyBucket.setRanges(listDelinquencyRanges); LoanDelinquencyTagHistory prevTagForLoan = new LoanDelinquencyTagHistory(); prevTagForLoan.setDelinquencyRange(range1); diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle index c5839bf3521..2f451055758 100644 --- a/integration-tests/build.gradle +++ b/integration-tests/build.gradle @@ -18,7 +18,10 @@ */ description = 'Fineract Integration Tests' +apply plugin: 'java' apply plugin: 'com.bmuschko.cargo' +apply plugin: 'io.freefair.lombok' +apply plugin: 'io.spring.dependency-management' // Configuration for the Gradle Cargo plugin // https://github.com/bmuschko/gradle-cargo-plugin @@ -26,6 +29,18 @@ configurations { tomcat } +dependencies { + annotationProcessor( + 'org.projectlombok:lombok', + 'org.mapstruct:mapstruct-processor' + ) + + testAnnotationProcessor( + 'org.projectlombok:lombok', + 'org.mapstruct:mapstruct-processor' + ) +} + apply from: 'dependencies.gradle' // Allow external drivers to be used for the tests without packaging it @@ -37,8 +52,15 @@ dependencies { driver 'mysql:mysql-connector-java:8.0.33' } +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} + cargo { - containerId "tomcat10x" + containerId = 'tomcat10x' // looks like Cargo doesn't detect the WAR file automatically in the multi-module setup deployable { @@ -74,14 +96,14 @@ cargo { } jvmArgs += ' -Dspring.profiles.active=test -Dfineract.events.external.enabled=true' property 'cargo.start.jvmargs', jvmArgs + property 'cargo.servlet.port', 8443 + property 'cargo.protocol', 'https' property 'cargo.tomcat.connector.keystoreFile', file("$rootDir/fineract-provider/src/main/resources/keystore.jks") property 'cargo.tomcat.connector.keystorePass', 'openmf' property 'cargo.tomcat.connector.keystoreType', 'JKS' property 'cargo.tomcat.httpSecure', true property 'cargo.tomcat.connector.sslProtocol', 'TLS' property 'cargo.tomcat.connector.clientAuth', false - property 'cargo.protocol', 'https' - property 'cargo.servlet.port', 8443 } } }