Return all applicable results from Lookup

and stop erroring on Lookup not found; just return a blank result
This commit is contained in:
Bryan Boreham committed 2016-03-02 17:01:12 -08:00
1 parent 03563e847e
commit b6eec08247
5 files changed
+31 -22

No files matched your search

+4
View File
@@ -49,6 +49,10 @@ func TestAllocFree(t *testing.T) {
require.NoError(t, err)
require.Equal(t, testAddr2, addr2.String(), "address")
addrs, err := alloc.Lookup(container1, subnet)
require.NoError(t, err)
require.Equal(t, []address.Address{addr1, addr2}, addrs)
// Ask for another address for a different container and check it's different
addr1b, _ := alloc.Allocate(container2, cidr1.HostRange(), returnFalse)
if addr1b.String() == testAddr1 {