Integration-Test hinzugefügt, um die Lauffähigkeit der App sicherzustellen
authorKai Moritz <kai@juplo.de>
Fri, 12 Aug 2022 21:18:19 +0000 (23:18 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 13 Aug 2022 07:22:36 +0000 (09:22 +0200)
src/test/java/de/juplo/kafka/ApplicationIT.java [new file with mode: 0644]

diff --git a/src/test/java/de/juplo/kafka/ApplicationIT.java b/src/test/java/de/juplo/kafka/ApplicationIT.java
new file mode 100644 (file)
index 0000000..4c149cc
--- /dev/null
@@ -0,0 +1,25 @@
+package de.juplo.kafka;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.kafka.test.context.EmbeddedKafka;
+
+import static de.juplo.kafka.ApplicationTests.TOPIC;
+
+
+@SpringBootTest(
+    properties = {
+        "consumer.bootstrap-server=${spring.embedded.kafka.brokers}",
+        "consumer.topic=" + TOPIC,
+        "spring.mongodb.embedded.version=4.4.13" })
+@EmbeddedKafka(topics = TOPIC)
+@AutoConfigureDataMongo
+public class ApplicationIT
+{
+  public static final String TOPIC = "FOO";
+
+
+  @Test
+  public void testApplicationStartup() {}
+}