Skip to content

Commit

Permalink
correct also mock tests
Browse files Browse the repository at this point in the history
Signed-off-by: see-quick <maros.orsak159@gmail.com>
  • Loading branch information
see-quick committed Nov 13, 2024
1 parent 9472f2a commit 9450b3e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

public class StrimziKafkaContainerMockTest {

private final static String KAFKA_3_9_0 = "3.9.0";

private StrimziKafkaContainer kafkaContainer;

@Test
Expand All @@ -47,7 +49,7 @@ public String getBootstrapServers() {
}
};

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion("3.9.0").buildListenersConfig(containerInfo);

String expectedListeners = "PLAINTEXT://0.0.0.0:9092,BROKER1://0.0.0.0:9091,";
String expectedAdvertisedListeners = "PLAINTEXT://localhost:9092,BROKER1://172.17.0.2:9091";
Expand Down Expand Up @@ -81,7 +83,7 @@ public String getBootstrapServers() {
}
};

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion(KAFKA_3_9_0).buildListenersConfig(containerInfo);

String expectedListeners = "PLAINTEXT://0.0.0.0:9092,BROKER1://0.0.0.0:9091,BROKER2://0.0.0.0:9090,";
String expectedAdvertisedListeners = "PLAINTEXT://localhost:9092,BROKER1://172.17.0.2:9091,BROKER2://172.18.0.2:9090";
Expand Down Expand Up @@ -113,7 +115,7 @@ public String getBootstrapServers() {
};
kafkaContainer.withKraft();

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion(KAFKA_3_9_0).buildListenersConfig(containerInfo);

String expectedListeners = "PLAINTEXT://0.0.0.0:9092,BROKER1://0.0.0.0:9091,CONTROLLER://0.0.0.0:9094";
String expectedAdvertisedListeners = "PLAINTEXT://localhost:9092,BROKER1://172.17.0.2:9091,CONTROLLER://localhost:9094";
Expand Down Expand Up @@ -147,7 +149,7 @@ public String getBootstrapServers() {
}
};

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion(KAFKA_3_9_0).buildListenersConfig(containerInfo);

String expectedListeners = "PLAINTEXT://0.0.0.0:9092,BROKER1://0.0.0.0:9091,";
String expectedAdvertisedListeners = "PLAINTEXT://localhost:9092,BROKER1://172.17.0.2:9091";
Expand Down Expand Up @@ -178,7 +180,7 @@ public String getBootstrapServers() {
}
};

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion(KAFKA_3_9_0).buildListenersConfig(containerInfo);

String expectedListeners = "PLAINTEXT://0.0.0.0:9092,";
String expectedAdvertisedListeners = "PLAINTEXT://localhost:9092";
Expand Down Expand Up @@ -209,7 +211,7 @@ public String getBootstrapServers() {
}
};

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion(KAFKA_3_9_0).buildListenersConfig(containerInfo);

String expectedListeners = "SSL://0.0.0.0:9092,BROKER1://0.0.0.0:9091,";
String expectedAdvertisedListeners = "SSL://localhost:9093,BROKER1://172.17.0.2:9091";
Expand Down Expand Up @@ -280,7 +282,7 @@ public String getBootstrapServers() {
}
};

String[] listenersConfig = kafkaContainer.buildListenersConfig(containerInfo);
String[] listenersConfig = kafkaContainer.withKafkaVersion(KAFKA_3_9_0).buildListenersConfig(containerInfo);

String expectedListeners = "PLAINTEXT://0.0.0.0:9092," +
"BROKER1://0.0.0.0:9091," +
Expand Down

0 comments on commit 9450b3e

Please sign in to comment.