Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Elasticsearch Services
Search Doc Service
Commits
5e6de51a
Commit
5e6de51a
authored
Oct 30, 2020
by
Jonas Waeber
Browse files
Fix test
parent
58818bc8
Pipeline
#16411
passed with stages
in 5 minutes and 24 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/test/kotlin/TestTransform.kt
View file @
5e6de51a
...
...
@@ -7,7 +7,6 @@ import org.junit.jupiter.api.assertThrows
import
org.memobase.helpers.JSON
import
java.io.File
import
java.io.FileInputStream
import
java.nio.charset.Charset
@TestInstance
(
TestInstance
.
Lifecycle
.
PER_CLASS
)
class
TestTransform
{
...
...
@@ -25,11 +24,11 @@ class TestTransform {
@Test
fun
`test
enriched
digital
metadata
record`
()
{
val
searchDoc
=
SearchDocTransform
(
"https://media.memobase.k8s.unibas.ch/memo/"
)
val
input
=
JSON
.
unpack
(
JSON
.
parse
(
FileInputStream
(
File
(
"$dataPath/enrich_digital_metadata_record.json"
)).
readAllBytes
().
toString
(
Charset
.
defaultCharset
()
)
)
[
0
])
val
input
=
JSON
.
unpack
(
JSON
.
parse
(
FileInputStream
(
File
(
"$dataPath/enrich_digital_metadata_record.json"
)).
bufferedReader
().
readLines
()
.
reduce
{
acc
,
s
->
acc
+
"\n"
+
s
})[
0
]
)
val
values
=
searchDoc
.
transform
(
input
)
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment