This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
2018-09-20 16:43:31 +02:00
|
|
|
package openwrt
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNetworkListInterfaces(t *testing.T) {
|
|
|
|
net := NewNetwork()
|
|
|
|
iface := net.ListInterfaces()
|
|
|
|
for _, ife := range iface {
|
|
|
|
fmt.Printf("%s\n", ife.Name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestListWirelessInterfaces(t *testing.T) {
|
|
|
|
net := NewNetwork()
|
2018-09-21 14:36:06 +02:00
|
|
|
res := net.ListWirelessInterfaces("./testdata/proc_net_wireless.txt")
|
2018-09-20 16:43:31 +02:00
|
|
|
for _, el := range res {
|
|
|
|
fmt.Printf("%s\n", el.Name)
|
|
|
|
}
|
|
|
|
}
|