tun: Create integration tests for MTU
Tests are good, y'all :)
This commit is contained in:
parent
a13b2243e6
commit
c444bf293e
1 changed files with 13 additions and 0 deletions
|
|
@ -98,3 +98,16 @@ impl TunInterface {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue