Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

interface test #11

Merged
merged 9 commits into from
Jan 25, 2016
Merged

interface test #11

merged 9 commits into from
Jan 25, 2016

Conversation

maqi
Copy link
Contributor

@maqi maqi commented Jan 15, 2016

No description provided.

@maidsafe-highfive
Copy link

r? @canndrew

(maidsafe_highfive has picked a reviewer for you, use r? to override)

@@ -537,12 +537,20 @@ pub fn get_if_addrs() -> io::Result<Vec<Interface>> {
#[cfg(test)]
mod test {
use super::get_if_addrs;
use ip::IpAddr;
use std::net::Ipv4Addr;

#[test]
fn test_get_if_addrs() {
let ifaces = get_if_addrs().unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be perhaps 2 tests, on for local_addr == 1 and another that compares what the OS believes is ifaddrs with what we believe, i.e. compare parsed output of ipconfig with our output or use /proc filesystem to get the interface addresses

@canndrew
Copy link
Contributor

This works on Linux but I haven't been able to test it on windows due to a compiler ICE. I'll trust @maqi and AppVeyor that it's working there aswell.

canndrew added a commit that referenced this pull request Jan 25, 2016
@canndrew canndrew merged commit ac06964 into maidsafe-archive:master Jan 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants