test: Don't accidentally accept that a chat protection is broken (#4550)

This commit is contained in:
Hocuri
2023-08-08 11:35:38 +02:00
committed by GitHub
parent 885f26ea8c
commit 53f04a134a
4 changed files with 16 additions and 13 deletions

View File

@@ -134,11 +134,11 @@ async fn check_aeap_transition(
let fiona = tcm.fiona().await;
tcm.send_recv_accept(&fiona, &bob, "Hi").await;
tcm.send_recv_accept(&bob, &fiona, "Hi back").await;
tcm.send_recv(&bob, &fiona, "Hi back").await;
}
tcm.send_recv_accept(&alice, &bob, "Hi").await;
tcm.send_recv_accept(&bob, &alice, "Hi back").await;
tcm.send_recv(&bob, &alice, "Hi back").await;
if verified {
mark_as_verified(&alice, &bob).await;
@@ -355,7 +355,7 @@ async fn test_aeap_replay_attack() -> Result<()> {
let bob = tcm.bob().await;
tcm.send_recv_accept(&alice, &bob, "Hi").await;
tcm.send_recv_accept(&bob, &alice, "Hi back").await;
tcm.send_recv(&bob, &alice, "Hi back").await;
let group =
chat::create_group_chat(&bob, chat::ProtectionStatus::Unprotected, "Group 0").await?;

View File

@@ -528,8 +528,7 @@ async fn test_outgoing_mua_msg() -> Result<()> {
)
.await?
.unwrap();
tcm.send_recv_accept(&alice, &bob, "Sending with DC again")
.await;
tcm.send_recv(&alice, &bob, "Sending with DC again").await;
alice
.golden_test_chat(sent.chat_id, "test_outgoing_mua_msg")
@@ -560,7 +559,7 @@ async fn test_reply() -> Result<()> {
}
tcm.send_recv_accept(&bob, &alice, "Heyho from DC").await;
let encrypted_msg = tcm.send_recv_accept(&alice, &bob, "Heyho back").await;
let encrypted_msg = tcm.send_recv(&alice, &bob, "Heyho back").await;
let unencrypted_msg = receive_imf(
&alice,