Skip to content

Commit

Permalink
fix netif linux macos
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbai committed Apr 20, 2024
1 parent f529524 commit 5a19819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ytflow/src/plugin/netif/sys/apple/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,11 @@ mod tests {

#[tokio::test]
async fn test_lookup() {
let selector =
NetifSelector::new(SelectionMode::Manual("en0".into()), FamilyPreference::Both);
let selector = NetifSelector::new(
SelectionMode::Manual("en0".into()),
FamilyPreference::Both,
|_| None,
);
selector.cached_netif.store(Arc::new(Netif {
name: "en0".into(),
bsd_name: CString::from_vec_with_nul(b"en0\0"[..].into()).unwrap(),
Expand Down
1 change: 1 addition & 0 deletions ytflow/src/plugin/netif/sys/linux/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ mod tests {
let selector = NetifSelector::new(
SelectionMode::Manual("wlp3s0".into()),
FamilyPreference::Both,
|_| None,
);
selector.cached_netif.store(Arc::new(Netif {
name: "wlp3s0".into(),
Expand Down

0 comments on commit 5a19819

Please sign in to comment.