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.
orion/openwrt/network_test.go
Philippe Caseiro b34ccd3dee Improving network_test.go ...
This way we don't need a real wifi card
2018-09-21 14:36:06 +02:00

23 lines
413 B
Go

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()
res := net.ListWirelessInterfaces("./testdata/proc_net_wireless.txt")
for _, el := range res {
fmt.Printf("%s\n", el.Name)
}
}