add basic buildEndpointFromInterface test

This commit is contained in:
Kent Gruber 2018-05-01 10:07:13 -04:00
commit 3c920397b9

View file

@ -46,3 +46,17 @@ func TestParseTargets(t *testing.T) {
t.Fatalf("expected '%d', got '%d'", 0, len(macs))
}
}
func TestBuildEndpointFromInterface(t *testing.T) {
ifaces, err := net.Interfaces()
if err != nil {
t.Error(err)
}
if len(ifaces) <= 0 {
t.Error("Unable to find any network interfaces to run test with.")
}
_, err = buildEndpointFromInterface(ifaces[0])
if err != nil {
t.Error(err)
}
}