浏览代码

Fixing the unit test for overlapping subnet

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Abhinandan Prativadi 7 年之前
父节点
当前提交
f5fa40f9aa
共有 1 个文件被更改,包括 2 次插入9 次删除
  1. 2 9
      libnetwork/ipam/allocator_test.go

+ 2 - 9
libnetwork/ipam/allocator_test.go

@@ -296,15 +296,8 @@ func TestDoublePoolRelease(t *testing.T) {
 
 			// Re-request the same pool
 			for i := 0; i < repeats; i++ {
-				pidN, _, _, err := a.RequestPool(localAddressSpace, "10.0.0.0/8", "", nil, false)
-				assert.NoError(t, err)
-				assert.Equal(t, pid0, pidN)
-			}
-
-			// Release the repeats
-			for i := 0; i < repeats; i++ {
-				err = a.ReleasePool(pid0)
-				assert.NoError(t, err)
+				_, _, _, err := a.RequestPool(localAddressSpace, "10.0.0.0/8", "", nil, false)
+				assert.Error(t, err)
 			}
 
 			// Release the initial request