TP-202405-filtered_import #78

Merged
hsh-michaelhoennig merged 7 commits from TP-202405-filtered_import into master 2024-07-16 10:23:16 +02:00
Showing only changes of commit 9e77cefabf - Show all commits

View File

@ -131,6 +131,7 @@ public class ImportOfficeData extends ContextBasedTest {
// at least as the number of lines in business-partners.csv from test-data, but less than real data partner count // at least as the number of lines in business-partners.csv from test-data, but less than real data partner count
public static final int MAX_NUMBER_OF_TEST_DATA_PARTNERS = 100; public static final int MAX_NUMBER_OF_TEST_DATA_PARTNERS = 100;
public static final String MIGRATION_DATA_PATH = ofNullable(System.getenv("HSADMINNG_MIGRATION_DATA_PATH")).orElse("migration") + "/";
static int relationId = 2000000; static int relationId = 2000000;
@ -182,7 +183,7 @@ public class ImportOfficeData extends ContextBasedTest {
@Order(1010) @Order(1010)
void importBusinessPartners() { void importBusinessPartners() {
try (Reader reader = resourceReader("migration.data/business-partners.csv")) { try (Reader reader = resourceReader(MIGRATION_DATA_PATH + "business-partners.csv")) {
final var lines = readAllLines(reader); final var lines = readAllLines(reader);
importBusinessPartners(justHeader(lines), withoutHeader(lines)); importBusinessPartners(justHeader(lines), withoutHeader(lines));
} catch (Exception e) { } catch (Exception e) {
@ -228,7 +229,7 @@ public class ImportOfficeData extends ContextBasedTest {
@Order(1020) @Order(1020)
void importContacts() { void importContacts() {
try (Reader reader = resourceReader("migration.data/contacts.csv")) { try (Reader reader = resourceReader(MIGRATION_DATA_PATH + "contacts.csv")) {
final var lines = readAllLines(reader); final var lines = readAllLines(reader);
importContacts(justHeader(lines), withoutHeader(lines)); importContacts(justHeader(lines), withoutHeader(lines));
} catch (Exception e) { } catch (Exception e) {
@ -328,7 +329,7 @@ public class ImportOfficeData extends ContextBasedTest {
@Order(1030) @Order(1030)
void importSepaMandates() { void importSepaMandates() {
try (Reader reader = resourceReader("migration.data/sepa-mandates.csv")) { try (Reader reader = resourceReader(MIGRATION_DATA_PATH + "sepa-mandates.csv")) {
final var lines = readAllLines(reader); final var lines = readAllLines(reader);
importSepaMandates(justHeader(lines), withoutHeader(lines)); importSepaMandates(justHeader(lines), withoutHeader(lines));
} catch (Exception e) { } catch (Exception e) {
@ -360,7 +361,7 @@ public class ImportOfficeData extends ContextBasedTest {
@Test @Test
@Order(1040) @Order(1040)
void importCoopShares() { void importCoopShares() {
try (Reader reader = resourceReader("migration.data/share-transactions.csv")) { try (Reader reader = resourceReader(MIGRATION_DATA_PATH + "share-transactions.csv")) {
final var lines = readAllLines(reader); final var lines = readAllLines(reader);
importCoopShares(justHeader(lines), withoutHeader(lines)); importCoopShares(justHeader(lines), withoutHeader(lines));
} catch (Exception e) { } catch (Exception e) {
@ -387,7 +388,7 @@ public class ImportOfficeData extends ContextBasedTest {
@Order(1050) @Order(1050)
void importCoopAssets() { void importCoopAssets() {
try (Reader reader = resourceReader("migration.data/asset-transactions.csv")) { try (Reader reader = resourceReader(MIGRATION_DATA_PATH + "asset-transactions.csv")) {
final var lines = readAllLines(reader); final var lines = readAllLines(reader);
importCoopAssets(justHeader(lines), withoutHeader(lines)); importCoopAssets(justHeader(lines), withoutHeader(lines));
} catch (Exception e) { } catch (Exception e) {