@@ -729,6 +729,8 @@ func TestGenerateBrokerConfigKRaftMode(t *testing.T) { //nolint funlen
729729 listenersConfig v1beta1.ListenersConfig
730730 internalListenerStatuses map [string ]v1beta1.ListenerStatusList
731731 controllerListenerStatus map [string ]v1beta1.ListenerStatusList
732+ zkAddresses []string
733+ zkPath string
732734 expectedBrokerConfigs []string
733735 }{
734736 {
@@ -1141,6 +1143,8 @@ process.roles=broker,controller
11411143 },
11421144 },
11431145 },
1146+ zkAddresses : []string {"example.zk:2181" },
1147+ zkPath : "/kafka" ,
11441148 expectedBrokerConfigs : []string {
11451149 `advertised.listeners=INTERNAL://kafka-0.kafka.svc.cluster.local:9092
11461150controller.listener.names=CONTROLLER
@@ -1177,6 +1181,7 @@ listener.security.protocol.map=INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
11771181listeners=INTERNAL://:9092,CONTROLLER://:9093
11781182log.dirs=/test-kafka-logs/kafka,/test-kafka-logs-50/kafka,/test-kafka-logs-100/kafka
11791183metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
1184+ zookeeper.connect=example.zk:2181/kafka
11801185` ,
11811186 `advertised.listeners=INTERNAL://kafka-200.kafka.svc.cluster.local:9092
11821187broker.id=200
@@ -1190,6 +1195,7 @@ listener.security.protocol.map=INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
11901195listeners=INTERNAL://:9092
11911196log.dirs=/test-kafka-logs/kafka
11921197metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
1198+ zookeeper.connect=example.zk:2181/kafka
11931199` ,
11941200 `advertised.listeners=INTERNAL://kafka-300.kafka.svc.cluster.local:9092
11951201cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
@@ -1225,6 +1231,8 @@ process.roles=broker
12251231 KRaftMode : true ,
12261232 ListenersConfig : test .listenersConfig ,
12271233 Brokers : test .brokers ,
1234+ ZKAddresses : test .zkAddresses ,
1235+ ZKPath : test .zkPath ,
12281236 },
12291237 },
12301238 },
0 commit comments