Look up by IP
This commit is contained in:
1 parent
5ee60a0003
commit
d868d27263
2 files changed
+20
No files matched your search
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user