Skip to content

Commit 289e2ac

Browse files
committed
test: silently skip the room summary test on CI, if the server doesn't support it
1 parent 90c35b6 commit 289e2ac

File tree

1 file changed

+13
-1
lines changed
  • testing/matrix-sdk-integration-testing/src/tests/sliding_sync

1 file changed

+13
-1
lines changed

Diff for: testing/matrix-sdk-integration-testing/src/tests/sliding_sync/room.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,19 @@ async fn get_room_preview_with_room_summary(
11741174
public_no_history_room_id: &RoomId,
11751175
) {
11761176
// Alice has joined the room, so they get the full details.
1177-
let preview = RoomPreview::from_room_summary(alice, room_id).await.unwrap();
1177+
let preview = match RoomPreview::from_room_summary(alice, room_id).await {
1178+
Ok(r) => r,
1179+
Err(err) => {
1180+
if let Some(client_api_error) = err.as_client_api_error() {
1181+
if client_api_error.status_code == 404 {
1182+
warn!("Skipping the room summary test, because the server may not support it.");
1183+
return;
1184+
}
1185+
}
1186+
panic!("{err}");
1187+
}
1188+
};
1189+
11781190
assert_room_preview(&preview, room_alias);
11791191
assert_eq!(preview.state, Some(RoomState::Joined));
11801192

0 commit comments

Comments
 (0)