File tree Expand file tree Collapse file tree
http-tracker-core/src/event Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,7 +124,17 @@ pub mod test {
124124 ) => {
125125 * connection == * expected_connection
126126 && * info_hash == * expected_info_hash
127+ && announcement. peer_id == expected_announcement. peer_id
127128 && announcement. peer_addr == expected_announcement. peer_addr
129+ // Events can't be compared due to the `updated` field.
130+ // The `announcement.uploaded` contains the current time
131+ // when the test is executed.
132+ // todo: mock time
133+ //&& announcement.updated == expected_announcement.updated
134+ && announcement. uploaded == expected_announcement. uploaded
135+ && announcement. downloaded == expected_announcement. downloaded
136+ && announcement. left == expected_announcement. left
137+ && announcement. event == expected_announcement. event
128138 }
129139 _ => false ,
130140 }
Original file line number Diff line number Diff line change @@ -711,7 +711,17 @@ pub(crate) mod tests {
711711 ) => {
712712 * connection == * expected_connection
713713 && * info_hash == * expected_info_hash
714+ && announcement. peer_id == expected_announcement. peer_id
714715 && announcement. peer_addr == expected_announcement. peer_addr
716+ // Events can't be compared due to the `updated` field.
717+ // The `announcement.uploaded` contains the current time
718+ // when the test is executed.
719+ // todo: mock time
720+ //&& announcement.updated == expected_announcement.updated
721+ && announcement. uploaded == expected_announcement. uploaded
722+ && announcement. downloaded == expected_announcement. downloaded
723+ && announcement. left == expected_announcement. left
724+ && announcement. event == expected_announcement. event
715725 }
716726 _ => false ,
717727 }
You can’t perform that action at this time.
0 commit comments