mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-10 17:45:41 +03:00
* move ./*.go files into ./home/ directory
This commit is contained in:
parent
9fe34818e3
commit
dc682763ff
27 changed files with 37 additions and 28 deletions
home
25
home/helpers_test.go
Normal file
25
home/helpers_test.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package home
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue