reduce likelihood of IP clashes in tests & examples

by using the 10.2 range, which is not one used by docker and also is
less likely than 10.0 to be used by something else.

Fixes #402.
This commit is contained in:
Matthias Radestock committed 2015-03-09 20:51:26 +00:00
1 parent abb1c6c781
commit 123e8bbb28
16 files changed
+77 -77

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ func TestHttp(t *testing.T) {
containerID = "deadbeef"
testDomain = "weave.local."
successTestName = "test1." + testDomain
testAddr1 = "10.0.2.1/24"
testAddr1 = "10.2.2.1/24"
dockerIP = "9.8.7.6"
)
+2 -2
View File
@@ -13,8 +13,8 @@ import (
var (
containerID = "deadbeef"
testName = "test.weave.local."
testAddr1 = "10.0.2.1/24"
testInAddr1 = "1.2.0.10.in-addr.arpa."
testAddr1 = "10.2.2.1/24"
testInAddr1 = "1.2.2.10.in-addr.arpa."
)
func sendQuery(name string, querytype uint16) error {
+2 -2
View File
@@ -12,7 +12,7 @@ import (
)
const (
testRDNSsuccess = "1.2.0.10.in-addr.arpa."
testRDNSsuccess = "1.2.2.10.in-addr.arpa."
testRDNSfail = "4.3.2.1.in-addr.arpa."
testRDNSnonlocal = "8.8.8.8.in-addr.arpa."
testPort = 17625
@@ -23,7 +23,7 @@ func TestUDPDNSServer(t *testing.T) {
successTestName = "test1.weave.local."
failTestName = "test2.weave.local."
nonLocalName = "weave.works."
testAddr1 = "10.0.2.1"
testAddr1 = "10.2.2.1"
)
testCIDR1 := testAddr1 + "/24"
+5 -5
View File
@@ -11,7 +11,7 @@ func TestZone(t *testing.T) {
containerID = "deadbeef"
otherContainerID = "cowjuice"
successTestName = "test1.weave."
testAddr1 = "10.0.2.1/24"
testAddr1 = "10.2.2.1/24"
)
var zone = new(ZoneDb)
@@ -21,9 +21,9 @@ func TestZone(t *testing.T) {
wt.AssertNoErr(t, err)
// Add a few more records to make the job harder
err = zone.AddRecord("abcdef0123", "adummy.weave.", net.ParseIP("10.0.0.1"))
err = zone.AddRecord("abcdef0123", "adummy.weave.", net.ParseIP("10.2.0.1"))
wt.AssertNoErr(t, err)
err = zone.AddRecord("0123abcdef", "zdummy.weave.", net.ParseIP("10.0.0.2"))
err = zone.AddRecord("0123abcdef", "zdummy.weave.", net.ParseIP("10.2.0.2"))
wt.AssertNoErr(t, err)
// Check that the address is now there.
@@ -35,7 +35,7 @@ func TestZone(t *testing.T) {
}
// See if we can find the address by IP.
foundName, err := zone.LookupInaddr("1.2.0.10.in-addr.arpa.")
foundName, err := zone.LookupInaddr("1.2.2.10.in-addr.arpa.")
wt.AssertNoErr(t, err)
if foundName != successTestName {
@@ -69,7 +69,7 @@ func TestDeleteFor(t *testing.T) {
var (
id = "foobar"
name = "foo.weave."
addr1 = "10.1.2.3/24"
addr1 = "10.2.2.3/24"
addr2 = "10.2.7.8/24"
)
zone := new(ZoneDb)