upd6
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
import netio
|
||||
|
||||
fn test_interfaces() {
|
||||
ifs := netio.interfaces()!
|
||||
dump(ifs)
|
||||
assert ifs.len > 0
|
||||
}
|
||||
|
||||
fn test_name_to_index() {
|
||||
assert netio.name_to_index('lo')! == 1
|
||||
}
|
||||
@@ -13,3 +7,14 @@ fn test_name_to_index() {
|
||||
fn test_index_to_name() {
|
||||
assert netio.index_to_name(1)! == 'lo'
|
||||
}
|
||||
|
||||
fn test_network_interfaces() {
|
||||
ifs := netio.network_interfaces()!
|
||||
// dump(ifs)
|
||||
assert ifs.len > 0
|
||||
}
|
||||
|
||||
fn test_find_network_interface() {
|
||||
assert netio.find_network_interface('lo')!.name == 'lo'
|
||||
assert netio.find_network_interface('1')!.index == 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user