mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-26 23:28:08 +03:00
24 lines
431 B
Go
24 lines
431 B
Go
package util
|
|
|
|
import (
|
|
"log"
|
|
"testing"
|
|
)
|
|
|
|
func TestGetValidNetInterfacesForWeb(t *testing.T) {
|
|
ifaces, err := GetValidNetInterfacesForWeb()
|
|
if err != nil {
|
|
t.Fatalf("Cannot get net interfaces: %s", err)
|
|
}
|
|
if len(ifaces) == 0 {
|
|
t.Fatalf("No net interfaces found")
|
|
}
|
|
|
|
for _, iface := range ifaces {
|
|
if len(iface.Addresses) == 0 {
|
|
t.Fatalf("No addresses found for %s", iface.Name)
|
|
}
|
|
|
|
log.Printf("%v", iface)
|
|
}
|
|
}
|