Commit a2b75b9a authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Fix tests for changes

parent 56bc317a
...@@ -49,10 +49,10 @@ class IntegrationTest { ...@@ -49,10 +49,10 @@ class IntegrationTest {
private val elasticSearchWrapperMocked = run { private val elasticSearchWrapperMocked = run {
val internal = mockk<ElasticSearchWrapper>() val internal = mockk<ElasticSearchWrapper>()
every { internal.getRecordSetName("soz-004") } returns LanguageContainer.placeholder("soz-004") 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", "accessInstitution") } returns emptyList()
every { internal.getExtraInstitutionsFromRecordSet("soz-004", "originalInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("soz-004", "originalInstitution") } returns emptyList()
every { internal.getExtraInstitutionsFromRecordSet("soz-004", "masterInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("soz-004", "masterInstitution") } returns emptyList()
every { internal.getInstitutionNamesFromRecordSet("soz-004") } returns listOf(FacetContainer.placeholder("soz"))
internal internal
} }
......
...@@ -43,6 +43,7 @@ class TestDocumentsSearchDoc { ...@@ -43,6 +43,7 @@ class TestDocumentsSearchDoc {
every { internal.getExtraInstitutionsFromRecordSet("", "accessInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("", "accessInstitution") } returns emptyList()
every { internal.getExtraInstitutionsFromRecordSet("", "originalInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("", "originalInstitution") } returns emptyList()
every { internal.getExtraInstitutionsFromRecordSet("", "masterInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("", "masterInstitution") } returns emptyList()
every { internal.getInstitutionNamesFromRecordSet("") } returns emptyList()
internal internal
} }
......
...@@ -38,6 +38,7 @@ class TestTransform { ...@@ -38,6 +38,7 @@ class TestTransform {
every { internal.getExtraInstitutionsFromRecordSet("", "accessInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("", "accessInstitution") } returns emptyList()
every { internal.getExtraInstitutionsFromRecordSet("", "originalInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("", "originalInstitution") } returns emptyList()
every { internal.getExtraInstitutionsFromRecordSet("", "masterInstitution") } returns emptyList() every { internal.getExtraInstitutionsFromRecordSet("", "masterInstitution") } returns emptyList()
every { internal.getInstitutionNamesFromRecordSet("") } returns emptyList()
internal internal
} }
......
...@@ -46,9 +46,6 @@ object TestUtilities { ...@@ -46,9 +46,6 @@ object TestUtilities {
val translationMappers = val translationMappers =
TranslationMappers(institutionTypePath, documentTypePath, accessTermPath, reuseStatementPath) TranslationMappers(institutionTypePath, documentTypePath, accessTermPath, reuseStatementPath)
val elasticSearchClient = mockk<RestHighLevelClient>()
fun connectToElasticSearch(host: String, port: Int, documentsIndex: String): RestHighLevelClient { fun connectToElasticSearch(host: String, port: Int, documentsIndex: String): RestHighLevelClient {
return try { return try {
val c = RestHighLevelClient( val c = RestHighLevelClient(
......
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