tun: Create integration tests for MTU

Tests are good, y'all :)
This commit is contained in:
Cara Salter 2023-04-29 15:25:49 -04:00 committed by Conrad Kramer
parent a13b2243e6
commit c444bf293e

View file

@ -98,3 +98,16 @@ impl TunInterface {
perform(socket.as_raw_fd())? perform(socket.as_raw_fd())?
} }
} }
mod test {
use super::TunInterface;
#[test]
fn mtu() {
let interf = TunInterface::new().unwrap();
interf.set_mtu(500).unwrap();
assert_eq!(interf.mtu().unwrap(), 500);
}
}