From a170c0b7db20ef4b1c5accd11453040fa12d9da5 Mon Sep 17 00:00:00 2001 From: valere Date: Tue, 9 May 2023 10:28:48 +0200 Subject: [PATCH] test legacy is partially cleaned --- .../DynamicElementAndroidToElementRMigrationTest.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/matrix-sdk-android/src/androidTestRustCrypto/java/org/matrix/android/sdk/internal/crypto/store/migration/DynamicElementAndroidToElementRMigrationTest.kt b/matrix-sdk-android/src/androidTestRustCrypto/java/org/matrix/android/sdk/internal/crypto/store/migration/DynamicElementAndroidToElementRMigrationTest.kt index f7439444eb..77dcb6b477 100644 --- a/matrix-sdk-android/src/androidTestRustCrypto/java/org/matrix/android/sdk/internal/crypto/store/migration/DynamicElementAndroidToElementRMigrationTest.kt +++ b/matrix-sdk-android/src/androidTestRustCrypto/java/org/matrix/android/sdk/internal/crypto/store/migration/DynamicElementAndroidToElementRMigrationTest.kt @@ -37,6 +37,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStoreMigration import org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStoreModule import org.matrix.android.sdk.internal.crypto.store.db.RustMigrationInfoProvider import org.matrix.android.sdk.internal.crypto.store.db.model.CryptoMetadataEntity +import org.matrix.android.sdk.internal.crypto.store.db.model.OlmSessionEntity import org.matrix.android.sdk.internal.database.RealmKeysUtils import org.matrix.android.sdk.internal.database.TestRealmConfigurationFactory import org.matrix.android.sdk.internal.util.time.Clock @@ -136,5 +137,9 @@ class DynamicElementAndroidToElementRMigrationTest { assertTrue(machine.roomKeyCounts().total.toInt() == 0) assertTrue(machine.roomKeyCounts().backedUp.toInt() == 0) } + + // legacy olm sessions should have been deleted + val remainingOlmSessions = realm!!.where().findAll().size + assertEquals("legacy olm sessions should have been removed from store",0, remainingOlmSessions) } }