FINERACT-1724: Further fixes for the cucumber tests

This commit is contained in:
Arnold Galovics
2023-06-06 11:45:08 +02:00
committed by Arnold Gálovics
parent e865d31dd9
commit 2b9928bc7e
3 changed files with 16 additions and 7 deletions
@@ -51,7 +51,7 @@ dependencyManagement {
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:4.0.0'
dependency 'com.google.guava:guava:31.1-jre'
dependency 'com.google.guava:guava:32.0.0-jre'
dependency 'com.google.code.gson:gson:2.10.1'
dependency 'com.google.truth:truth:1.1.3'
dependency 'com.google.truth.extensions:truth-java8-extension:1.1.3'
@@ -82,6 +82,7 @@ dependencyManagement {
exclude 'org.apache.logging.log4j:log4j-api'
exclude 'org.slf4j:slf4j-api'
exclude 'commons-io:commons-io'
exclude 'commons-logging:commons-logging'
exclude 'commons-codec:commons-codec'
exclude 'org.apache.commons:commons-compress'
exclude 'org.apache.commons:commons-lang3'
@@ -109,7 +110,9 @@ dependencyManagement {
exclude 'org.apache.commons:commons-compress'
exclude 'xml-apis:xml-apis'
}
dependency 'org.apache.httpcomponents:httpclient:4.5.14'
dependency ('org.apache.httpcomponents:httpclient:4.5.14') {
exclude 'commons-logging:commons-logging:'
}
dependency 'jakarta.management.j2ee:jakarta.management.j2ee-api:1.1.4'
dependency 'jakarta.jms:jakarta.jms-api:3.1.0'
dependency 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
@@ -114,6 +114,12 @@ public class ClasspathDuplicatesStepDefinitions implements En {
|| resourcePath.equals("META-INF/BC1024KE.DSA") || resourcePath.equals("META-INF/BC2048KE.SF")
|| resourcePath.equals("META-INF/BC1024KE.SF") || resourcePath.equals("OSGI-INF/bundle.info")
|| resourcePath.equals("META-INF/DUMMY.SF") || resourcePath.equals("META-INF/DUMMY.DSA")
|| resourcePath.equals("META-INF/validation-mapping-1.0.xsd") || resourcePath.equals("META-INF/validation-mapping-1.1.xsd")
|| resourcePath.equals("META-INF/validation-mapping-2.0.xsd") || resourcePath.equals("META-INF/validation-mapping-3.0.xsd")
|| resourcePath.equals("META-INF/validation-configuration-1.0.xsd")
|| resourcePath.equals("META-INF/validation-configuration-1.1.xsd")
|| resourcePath.equals("META-INF/validation-configuration-2.0.xsd")
|| resourcePath.equals("META-INF/validation-configuration-3.0.xsd")
// Spring Framework knows what they are do..
|| resourcePath.startsWith("META-INF/spring") || resourcePath.startsWith("META-INF/additional-spring")
|| resourcePath.startsWith("META-INF/terracotta")
@@ -19,11 +19,10 @@
package org.apache.fineract.infrastructure.core;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
@@ -119,15 +118,16 @@ public class LiquibaseStepDefinitions implements En {
Then("The tenant store upgrade fails with a schema upgrade needed", () -> {
assertThat(executionException).isNotNull();
verify(liquibaseFactory).create(eq(tenantStoreDataSource), any());
verify(liquibaseFactory).create(eq(tenantStoreDataSource), anyString(), anyString());
verifyNoMoreInteractions(liquibaseFactory);
verifyNoInteractions(initialTenantStoreLiquibase, tenantStoreLiquibase, initialTenantLiquibase, tenantLiquibase);
});
Then("The default tenant upgrade fails with a schema upgrade needed", () -> {
assertThat(executionException).isNotNull();
verify(liquibaseFactory, times(2)).create(eq(tenantStoreDataSource), any());
verify(liquibaseFactory).create(eq(defaultTenantDataSource), any());
verify(liquibaseFactory).create(eq(tenantStoreDataSource), anyString(), anyString());
verify(liquibaseFactory).create(eq(tenantStoreDataSource), anyString());
verify(liquibaseFactory).create(eq(defaultTenantDataSource), anyString(), anyString(), anyString());
verifyNoMoreInteractions(liquibaseFactory);
verify(initialTenantStoreLiquibase).changeLogSync();
verify(tenantStoreLiquibase).afterPropertiesSet();