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
a2b75b9a
Commit
a2b75b9a
authored
Jul 29, 2021
by
Jonas Waeber
Browse files
Fix tests for changes
parent
56bc317a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/test/kotlin/IntegrationTest.kt
View file @
a2b75b9a
...
...
@@ -49,10 +49,10 @@ class IntegrationTest {
private
val
elasticSearchWrapperMocked
=
run
{
val
internal
=
mockk
<
ElasticSearchWrapper
>()
every
{
internal
.
getRecordSetName
(
"soz-004"
)
}
returns
LanguageContainer
.
placeholder
(
"soz-004"
)
every
{
internal
.
getInstitutionName
(
"soz"
)
}
returns
FacetContainer
.
placeholder
(
"soz"
)
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
"soz-004"
,
"accessInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
"soz-004"
,
"originalInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
"soz-004"
,
"masterInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getInstitutionNamesFromRecordSet
(
"soz-004"
)
}
returns
listOf
(
FacetContainer
.
placeholder
(
"soz"
))
internal
}
...
...
src/test/kotlin/TestDocumentsSearchDoc.kt
View file @
a2b75b9a
...
...
@@ -43,6 +43,7 @@ class TestDocumentsSearchDoc {
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
""
,
"accessInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
""
,
"originalInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
""
,
"masterInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getInstitutionNamesFromRecordSet
(
""
)
}
returns
emptyList
()
internal
}
...
...
src/test/kotlin/TestTransform.kt
View file @
a2b75b9a
...
...
@@ -38,6 +38,7 @@ class TestTransform {
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
""
,
"accessInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
""
,
"originalInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getExtraInstitutionsFromRecordSet
(
""
,
"masterInstitution"
)
}
returns
emptyList
()
every
{
internal
.
getInstitutionNamesFromRecordSet
(
""
)
}
returns
emptyList
()
internal
}
...
...
src/test/kotlin/TestUtilities.kt
View file @
a2b75b9a
...
...
@@ -46,9 +46,6 @@ object TestUtilities {
val
translationMappers
=
TranslationMappers
(
institutionTypePath
,
documentTypePath
,
accessTermPath
,
reuseStatementPath
)
val
elasticSearchClient
=
mockk
<
RestHighLevelClient
>()
fun
connectToElasticSearch
(
host
:
String
,
port
:
Int
,
documentsIndex
:
String
):
RestHighLevelClient
{
return
try
{
val
c
=
RestHighLevelClient
(
...
...
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