Merge branch '1.0'

Conflicts:
	ipam/allocator_test.go
This commit is contained in:
Matthias Radestock committed 2015-06-26 14:08:09 +01:00
commit 8dd9020803
2 files changed
+65 -38

No files matched your search

+7 -2
View File
@@ -168,7 +168,7 @@ func TestCancel(t *testing.T) {
CIDR = "10.0.1.7/26"
)
router := TestGossipRouter{make(map[router.PeerName]chan gossipMessage), 0.0}
router := TestGossipRouter{make(map[router.PeerName]chan interface{}), 0.0}
alloc1, subnet := makeAllocator("01:00:00:02:00:00", CIDR, 2)
alloc1.SetInterfaces(router.connect(alloc1.ourName, alloc1))
@@ -256,13 +256,17 @@ func TestTransfer(t *testing.T) {
require.True(t, err == nil, "Failed to get address")
router.GossipBroadcast(alloc2.Gossip())
router.flush()
router.GossipBroadcast(alloc3.Gossip())
router.flush()
router.removePeer(alloc2.ourName)
router.removePeer(alloc3.ourName)
alloc2.Stop()
alloc3.Stop()
router.flush()
require.NoError(t, alloc1.AdminTakeoverRanges(alloc2.ourName.String()))
require.NoError(t, alloc1.AdminTakeoverRanges(alloc3.ourName.String()))
router.flush()
require.Equal(t, address.Offset(1022), alloc1.NumFreeAddresses(subnet))
@@ -282,7 +286,8 @@ func TestFakeRouterSimple(t *testing.T) {
alloc1 := allocs[0]
//alloc2 := allocs[1]
alloc1.Allocate("foo", subnet, nil)
_, err := alloc1.Allocate("foo", subnet, nil)
require.NoError(t, err, "Failed to get address")
}
func TestAllocatorFuzz(t *testing.T) {