From 3c3403143772c4a2332fa3c8ea77b4074cf85745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chrz=C4=85szcz?= Date: Tue, 30 May 2023 16:13:38 +0200 Subject: [PATCH] Update push suites - Expect map instead of list (internal format has changed( - Remove test repetition --- big_tests/tests/push_SUITE.erl | 5 ++--- big_tests/tests/push_integration_SUITE.erl | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/big_tests/tests/push_SUITE.erl b/big_tests/tests/push_SUITE.erl index ae81e38ff6..e7cd6bccb9 100644 --- a/big_tests/tests/push_SUITE.erl +++ b/big_tests/tests/push_SUITE.erl @@ -36,7 +36,7 @@ all() -> ]. groups() -> - G = [ + [ {toggling, [parallel], [ enable_should_fail_with_missing_attributes, enable_should_fail_with_invalid_attributes, @@ -68,8 +68,7 @@ groups() -> muclight_msg_notify_if_user_offline_with_publish_options, muclight_msg_notify_stops_after_disabling ]} - ], - ct_helper:repeat_all_until_all_ok(G). + ]. notification_groups() -> [ diff --git a/big_tests/tests/push_integration_SUITE.erl b/big_tests/tests/push_integration_SUITE.erl index ef21f28d99..b91108b0d0 100644 --- a/big_tests/tests/push_integration_SUITE.erl +++ b/big_tests/tests/push_integration_SUITE.erl @@ -954,8 +954,8 @@ add_user_server_to_whitelist(User, {NodeAddr, NodeName}) -> assert_push_notification_in_session(User, NodeName, Service, DeviceToken) -> Info = mongoose_helper:get_session_info(?RPC_SPEC, User), {_JID, NodeName, Details} = maps:get(?SESSION_KEY, Info), - ?assertMatch({<<"service">>, Service}, lists:keyfind(<<"service">>, 1, Details)), - ?assertMatch({<<"device_id">>, DeviceToken}, lists:keyfind(<<"device_id">>, 1, Details)). + ?assertMatch(#{<<"service">> := Service}, Details), + ?assertMatch(#{<<"device_id">> := DeviceToken}, Details). wait_for_push_request(DeviceToken) -> mongoose_push_mock:wait_for_push_request(DeviceToken, 10000).