Extend tests slightly
This commit is contained in:
1 parent
fa0331cb6d
commit
5ee60a0003
1 file changed
+7
-1
+7
-1
@@ -20,12 +20,18 @@ func TestZone(t *testing.T) {
|
|||||||
err := zone.AddRecord(containerID, successTestName, ip, weaveIP)
|
err := zone.AddRecord(containerID, successTestName, ip, weaveIP)
|
||||||
assertNoErr(t, err)
|
assertNoErr(t, err)
|
||||||
|
|
||||||
|
// Add a few more records to make the job harder
|
||||||
|
err = zone.AddRecord("abcdef0123", "adummy.weave.", net.ParseIP("1.1.1.1"), net.ParseIP("10.0.0.1"))
|
||||||
|
assertNoErr(t, err)
|
||||||
|
err = zone.AddRecord("0123abcdef", "zdummy.weave.", net.ParseIP("2.2.2.2"), net.ParseIP("10.0.0.2"))
|
||||||
|
assertNoErr(t, err)
|
||||||
|
|
||||||
// Check that the address is now there.
|
// Check that the address is now there.
|
||||||
foundIP, err := zone.MatchLocal(successTestName)
|
foundIP, err := zone.MatchLocal(successTestName)
|
||||||
assertNoErr(t, err)
|
assertNoErr(t, err)
|
||||||
|
|
||||||
if !foundIP.Equal(weaveIP) {
|
if !foundIP.Equal(weaveIP) {
|
||||||
t.Fatal("Unexpected result for", successTestName, ip)
|
t.Fatal("Unexpected result for", successTestName, foundIP)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now try to add the same address again
|
// Now try to add the same address again
|
||||||
|
|||||||
Reference in new issue
Block a user