Skip to content

Commit c2171b3

Browse files
Fix existing E2eeSanityTests to support changes for key history sharing
1 parent 6a9aaa2 commit c2171b3

File tree

1 file changed

+6
-5
lines changed
  • matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto

1 file changed

+6
-5
lines changed

matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeSanityTests.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,15 @@ class E2eeSanityTests : InstrumentedTest {
143143
delay(3_000)
144144
}
145145

146-
// check that messages are encrypted (uisi)
146+
// Due to the new shared keys implementation, invited user should be able to decrypt messages
147147
newAccount.forEach { otherSession ->
148148
testHelper.waitWithLatch { latch ->
149149
testHelper.retryPeriodicallyWithLatch(latch) {
150150
val timelineEvent = otherSession.getRoom(e2eRoomID)?.getTimelineEvent(sentEventId!!).also {
151151
Log.v("#E2E TEST", "Event seen by new user ${it?.root?.getClearType()}|${it?.root?.mCryptoError}")
152152
}
153153
timelineEvent != null &&
154-
timelineEvent.root.getClearType() == EventType.ENCRYPTED &&
155-
timelineEvent.root.mCryptoError == MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID
154+
timelineEvent.root.getClearType() == EventType.MESSAGE
156155
}
157156
}
158157
}
@@ -296,11 +295,13 @@ class E2eeSanityTests : InstrumentedTest {
296295
}
297296

298297
val importedResult = testHelper.doSync<ImportRoomKeysResult> {
299-
keysBackupService.restoreKeyBackupWithPassword(keyVersionResult!!,
298+
keysBackupService.restoreKeyBackupWithPassword(
299+
keyVersionResult!!,
300300
keyBackupPassword,
301301
null,
302302
null,
303-
null, it)
303+
null, it
304+
)
304305
}
305306

306307
assertEquals(3, importedResult.totalNumberOfKeys)

0 commit comments

Comments
 (0)