mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-07-01 22:22:53 +00:00
feat: new kafka config due to kafka input
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
package dev.dnpm.etl.processor.config
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import dev.dnpm.etl.processor.input.KafkaInputListener
|
||||
import dev.dnpm.etl.processor.monitoring.RequestRepository
|
||||
import dev.dnpm.etl.processor.output.KafkaMtbFileSender
|
||||
import dev.dnpm.etl.processor.output.RestMtbFileSender
|
||||
@ -78,8 +79,8 @@ class AppConfigurationTest {
|
||||
@TestPropertySource(
|
||||
properties = [
|
||||
"app.kafka.servers=localhost:9092",
|
||||
"app.kafka.topic=test",
|
||||
"app.kafka.response-topic=test-response",
|
||||
"app.kafka.output-topic=test",
|
||||
"app.kafka.output-response-topic=test-response",
|
||||
"app.kafka.group-id=test"
|
||||
]
|
||||
)
|
||||
@ -99,8 +100,8 @@ class AppConfigurationTest {
|
||||
properties = [
|
||||
"app.rest.uri=http://localhost:9000",
|
||||
"app.kafka.servers=localhost:9092",
|
||||
"app.kafka.topic=test",
|
||||
"app.kafka.response-topic=test-response",
|
||||
"app.kafka.output-topic=test",
|
||||
"app.kafka.output-response-topic=test-response",
|
||||
"app.kafka.group-id=test"
|
||||
]
|
||||
)
|
||||
@ -114,6 +115,43 @@ class AppConfigurationTest {
|
||||
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestPropertySource(
|
||||
properties = [
|
||||
"app.kafka.servers=localhost:9092",
|
||||
"app.kafka.output-topic=test",
|
||||
"app.kafka.output-response-topic=test-response",
|
||||
"app.kafka.group-id=test"
|
||||
]
|
||||
)
|
||||
inner class AppConfigurationWithoutKafkaInputTest(private val context: ApplicationContext) {
|
||||
|
||||
@Test
|
||||
fun shouldNotUseKafkaInputListener() {
|
||||
assertThrows<NoSuchBeanDefinitionException> { context.getBean(KafkaInputListener::class.java) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestPropertySource(
|
||||
properties = [
|
||||
"app.kafka.servers=localhost:9092",
|
||||
"app.kafka.input-topic=test_input",
|
||||
"app.kafka.output-topic=test",
|
||||
"app.kafka.output-response-topic=test-response",
|
||||
"app.kafka.group-id=test"
|
||||
]
|
||||
)
|
||||
inner class AppConfigurationUsingKafkaInputTest(private val context: ApplicationContext) {
|
||||
|
||||
@Test
|
||||
fun shouldUseKafkaInputListener() {
|
||||
assertThat(context.getBean(KafkaInputListener::class.java)).isNotNull
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestPropertySource(
|
||||
properties = [
|
||||
|
Reference in New Issue
Block a user