Using in memory databases for the test cases

This commit is contained in:
Vitor Pamplona
2025-12-24 17:09:33 -05:00
parent 09eeebba94
commit 77e56f86a9
4 changed files with 4 additions and 10 deletions
@@ -41,15 +41,12 @@ class AddressableTest {
@Before
fun setup() {
val context = ApplicationProvider.getApplicationContext<Context>()
context.deleteDatabase("test.db")
db = EventStore(context, "test.db", relayUrl = "testUrl")
db = EventStore(context, null)
}
@After
fun tearDown() {
db.close()
val context = ApplicationProvider.getApplicationContext<Context>()
context.deleteDatabase("test.db")
}
@Test
@@ -42,7 +42,7 @@ class ExpirationTest {
@Before
fun setup() {
val context = ApplicationProvider.getApplicationContext<Context>()
db = EventStore(context, null, relayUrl = "testUrl")
db = EventStore(context, null)
}
@After
@@ -56,15 +56,12 @@ class LargeDBTests {
@Before
fun setup() {
val context = ApplicationProvider.getApplicationContext<Context>()
context.deleteDatabase("test_large.db")
db = EventStore(context, "largeDBTest.db")
db = EventStore(context, null)
}
@After
fun tearDown() {
db.close()
val context = ApplicationProvider.getApplicationContext<Context>()
context.deleteDatabase("test_large.db")
}
@Test
@@ -41,7 +41,7 @@ class ReplaceableTest {
@Before
fun setup() {
val context = ApplicationProvider.getApplicationContext<Context>()
db = EventStore(context, null, relayUrl = "testUrl")
db = EventStore(context, null)
}
@After