Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
fix(test): fix node_msg_to_self test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoga07 authored and dirvine committed May 13, 2021
1 parent 4d8ae27 commit a563a77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/routing/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1475,9 +1475,9 @@ async fn message_to_self(dst: MessageDst) -> Result<()> {
let section_name = XorName::random();

let src = SrcLocation::Node(*peer.name());
let dst = match dst {
MessageDst::Node => DstLocation::Node(*peer.name()),
MessageDst::Section => DstLocation::Section(section_name),
let (dst, dst_name) = match dst {
MessageDst::Node => (DstLocation::Node(*peer.name()), *peer.name()),
MessageDst::Section => (DstLocation::Section(section_name), section_name),
};
let content = Bytes::from_static(b"hello");

Expand All @@ -1497,7 +1497,7 @@ async fn message_to_self(dst: MessageDst) -> Result<()> {
assert_eq!(sender.as_ref(), Some(peer.addr()));
assert_eq!(message.src().src_location(), src);
assert_eq!(message.dst(), &dst);
assert_eq!(dest_info.dest, section_name);
assert_eq!(dest_info.dest, dst_name);
assert_matches!(
message.variant(),
Variant::UserMessage(actual_content) if actual_content == &content
Expand Down

0 comments on commit a563a77

Please sign in to comment.