diff --git a/network/lan_test.go b/network/lan_test.go index a5c2e268..ca2546e5 100644 --- a/network/lan_test.go +++ b/network/lan_test.go @@ -107,3 +107,15 @@ func TestList(t *testing.T) { t.Fatalf("expected '%d', got '%d'", exp, got) } } + +func TestAliases(t *testing.T) { + exampleAlias := "picat" + exampleLAN := buildExampleLAN() + exampleEndpoint := buildExampleEndpoint() + exampleLAN.hosts[exampleEndpoint.HwAddress] = exampleEndpoint + exp := exampleAlias + got := exampleLAN.Aliases().Get(exampleEndpoint.HwAddress) + if got != exp { + t.Fatalf("expected '%v', got '%v'", exp, got) + } +}