test: Introduced integration-tests for `NoStorageStorageStrategy`
authorKai Moritz <kai@juplo.de>
Mon, 19 Feb 2024 10:05:17 +0000 (11:05 +0100)
committerKai Moritz <kai@juplo.de>
Mon, 19 Feb 2024 13:22:42 +0000 (14:22 +0100)
--
ALIGN

src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageAndShardingConfigurationIT.java
src/test/java/de/juplo/kafka/chat/backend/InMemoryWithNoStorageConfigurationIT.java

index fd2866b..fb36418 100644 (file)
@@ -1,16 +1,31 @@
 package de.juplo.kafka.chat.backend;
 
+import org.junit.jupiter.api.Disabled;
 import org.springframework.boot.test.context.SpringBootTest;
 
 
 @SpringBootTest(
     webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
     properties = {
-        "chat.backend.inmemory.storage-strategy=files",
-        "chat.backend.inmemory.storage-directory=target/test-classes/data/files",
+        "chat.backend.inmemory.storage-strategy=none",
         "chat.backend.inmemory.sharding-strategy=kafkalike",
         "chat.backend.inmemory.num-shards=10",
         "chat.backend.inmemory.owned-shards=2" })
-class InMemoryWithFilesAndShardingConfigurationIT extends AbstractConfigurationWithShardingIT
+class InMemoryWithNoStorageAndShardingConfigurationIT extends AbstractConfigurationWithShardingIT
 {
+  @Override
+  @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+  void testRestoredChatRoomsCanBeListed() {}
+
+  @Override
+  @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+  void testRestoredChatRoomHasExpectedDetails() {}
+
+  @Override
+  @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+  void testRestoredMessageForUteHasExpectedText() {}
+
+  @Override
+  @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+  void testRestoredMessageForPeterHasExpectedText() {}
 }
index 2ff9e11..89748a1 100644 (file)
@@ -1,5 +1,6 @@
 package de.juplo.kafka.chat.backend;
 
+import org.junit.jupiter.api.Disabled;
 import org.springframework.boot.test.context.SpringBootTest;
 
 
@@ -7,8 +8,22 @@ import org.springframework.boot.test.context.SpringBootTest;
                webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
                properties = {
                                "chat.backend.inmemory.sharding-strategy=none",
-                               "chat.backend.inmemory.storage-strategy=files",
-                               "chat.backend.inmemory.storage-directory=target/test-classes/data/files" })
-class InMemoryWithFilesConfigurationIT extends AbstractConfigurationIT
+                               "chat.backend.inmemory.storage-strategy=none" })
+class InMemoryWithNoStorageConfigurationIT extends AbstractConfigurationIT
 {
+       @Override
+       @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+       void testRestoredChatRoomsCanBeListed() {}
+
+       @Override
+       @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+       void testRestoredChatRoomHasExpectedDetails() {}
+
+       @Override
+       @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+       void testRestoredMessageForUteHasExpectedText() {}
+
+       @Override
+       @Disabled("Chat-Rooms cannot be restored, if storage is disabled")
+       void testRestoredMessageForPeterHasExpectedText() {}
 }