Skip to content

Commit af4d6ab

Browse files
committed
fix when container is not 8.x while creating sslcontext
1 parent b85ff95 commit af4d6ab

File tree

1 file changed

+2
-3
lines changed
  • lib/stove-testing-e2e-elasticsearch/src/main/kotlin/com/trendyol/stove/testing/e2e/elasticsearch

1 file changed

+2
-3
lines changed

lib/stove-testing-e2e-elasticsearch/src/main/kotlin/com/trendyol/stove/testing/e2e/elasticsearch/ElasticsearchSystem.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class ElasticsearchSystem internal constructor(
133133
}
134134

135135
override suspend fun afterRun() {
136-
esClient = createEsClient(exposedConfiguration, context.container.createSslContextFromCa())
136+
esClient = createEsClient(exposedConfiguration)
137137
context.options.migrationCollection.run(esClient)
138138
}
139139

@@ -216,10 +216,9 @@ class ElasticsearchSystem internal constructor(
216216

217217
private fun createEsClient(
218218
exposedConfiguration: ElasticSearchExposedConfiguration,
219-
sslContext: SSLContext,
220219
): ElasticsearchClient =
221220
context.options.clientConfigurer.restClientOverrideFn
222-
.getOrElse { { cfg -> secureRestClient(cfg, sslContext) } }
221+
.getOrElse { { cfg -> secureRestClient(cfg, context.container.createSslContextFromCa()) } }
223222
.let { RestClientTransport(it(exposedConfiguration), JacksonJsonpMapper(jacksonObjectMapper())) }
224223
.let { ElasticsearchClient(it) }
225224

0 commit comments

Comments
 (0)