hosting-asset-data-migration #79
@ -20,15 +20,14 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
@ -69,6 +68,8 @@ public class CsvDataImport extends ContextBasedTest {
|
||||
@MockBean
|
||||
HttpServletRequest request;
|
||||
|
||||
private static final List<AssertionError> errors = new ArrayList<>();
|
||||
|
||||
public List<String[]> readAllLines(Reader reader) throws Exception {
|
||||
|
||||
final var parser = new CSVParserBuilder()
|
||||
@ -211,12 +212,17 @@ public class CsvDataImport extends ContextBasedTest {
|
||||
}
|
||||
|
||||
void logError(final Runnable assertion) {
|
||||
assertion.run();
|
||||
try {
|
||||
assertion.run();
|
||||
} catch (final AssertionError exc) {
|
||||
System.err.println(exc);
|
||||
errors.add(exc);
|
||||
}
|
||||
}
|
||||
|
||||
void logErrors() {
|
||||
assumeThat(errors).isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
class Columns {
|
||||
|
@ -310,6 +310,12 @@ public class ImportHostingAssets extends ImportOfficeData {
|
||||
persistHostingAssetsOfType(IPV4_NUMBER);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(99999)
|
||||
void logErrors() {
|
||||
super.logErrors();
|
||||
}
|
||||
|
||||
private void persistRecursively(final Integer key, final HsBookingItemEntity bi) {
|
||||
if (bi.getParentItem() != null) {
|
||||
persistRecursively(key, HsBookingItemEntityValidatorRegistry.validated(bi.getParentItem()));
|
||||
|
@ -500,7 +500,6 @@ public class ImportOfficeData extends CsvDataImport {
|
||||
|
||||
@Test
|
||||
@Order(2000)
|
||||
// @Disabled // FIXME
|
||||
void verifyAllPartnersHavePersons() {
|
||||
partners.forEach((id, p) -> {
|
||||
final var partnerRel = p.getPartnerRel();
|
||||
|
Loading…
Reference in New Issue
Block a user