mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 21:15:35 +03:00
25 lines
462 B
Go
25 lines
462 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/AdguardTeam/golibs/log"
|
|
)
|
|
|
|
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)
|
|
}
|
|
}
|