Commit 0548bac9 authored by Jonas Waeber's avatar Jonas Waeber

Add error message.

parent 0ce345d5
Pipeline #23082 passed with stage
in 2 minutes and 14 seconds
......@@ -50,11 +50,11 @@ class ResourceBuilder(
when (val id = source[config.uri]) {
is String -> recordId = id
is Int -> recordId = id.toString()
is JsonArray<*> -> "Found multiple values in the field '${config.uri}' for identifiers: ${
is JsonArray<*> -> errorMessages.add("Found multiple values in the field '${config.uri}' for identifiers: ${
id.joinToString(
", "
)
}."
}.")
null -> errorMessages.add("The value for id is 'null' in field '${config.uri}'.")
else -> errorMessages.add("Invalid value '$id' for id in field '${config.uri}'.")
}
......
......@@ -34,9 +34,9 @@ import org.junit.jupiter.api.TestInstance
class LocalTestRun {
private val log = LogManager.getLogger(this::class.java)
private val headerMetadata = HeaderMetadata(
"swi-001",
"ati-002",
"1",
"swi",
"ati",
false,
"record",
"identifierMain",
......@@ -46,9 +46,9 @@ class LocalTestRun {
@Test
@Disabled
fun `test local folder`() {
val folder = "/home/jonas/memobase/data/swi-001"
val inputFolder = "/home/jonas/memobase/data/test-swi/step-2"
val outputFolder = "/home/jonas/memobase/data/test-swi/step-3"
val folder = "/home/jonas/memobase/data/ati-002"
val inputFolder = "/home/jonas/memobase/data/test-ati/step-2"
val outputFolder = "/home/jonas/memobase/data/test-ati/step-3"
val mappingFile = "/config/mapping.yml"
val klaxon = Klaxon()
val configurationParser = MappingConfigurationParser(File(folder + mappingFile).readBytes())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment