Look up by IP

This commit is contained in:
Bryan Boreham committed 2014-10-24 14:47:49 +01:00
1 parent 5ee60a0003
commit d868d27263
2 files changed
+20

No files matched your search

+8
View File
@@ -34,6 +34,14 @@ func TestZone(t *testing.T) {
t.Fatal("Unexpected result for", successTestName, foundIP)
}
// See if we can find the address by IP.
foundName, err := zone.MatchLocalIP(weaveIP)
assertNoErr(t, err)
if foundName != successTestName {
t.Fatal("Unexpected result for", weaveIP, foundName)
}
// Now try to add the same address again
err = zone.AddRecord(containerID, successTestName, ip, weaveIP)
assertErrorType(t, err, (*DuplicateError)(nil), "duplicate add")