File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1171,12 +1171,18 @@ func TestEgressCIDRAllocationOffline(t *testing.T) {
1171
1171
t .Fatalf ("%v" , err )
1172
1172
}
1173
1173
1174
- // Next reallocation should reassign egress IPs to node-3
1174
+ // Next reallocation should reassign the IPs that were removed in the previous
1175
+ // round. While the last reallocation was designed to aim for a next reallocation
1176
+ // where all of the removed IPs end up on node-3, it's possible 1 of them will
1177
+ // end up getting reallocated back to the same node it was removed from.
1175
1178
allocation = eit .ReallocateEgressIPs ()
1176
1179
node3ips = allocation ["node-3" ]
1177
1180
node4ips = allocation ["node-4" ]
1178
1181
node5ips = allocation ["node-5" ]
1179
- if len (node3ips ) < 2 || len (node4ips ) == 0 || len (node5ips ) == 0 {
1182
+ if len (node3ips ) < 1 || len (node3ips ) > 3 ||
1183
+ len (node4ips ) < 1 || len (node4ips ) > 3 ||
1184
+ len (node5ips ) < 1 || len (node5ips ) > 3 ||
1185
+ len (node3ips )+ len (node4ips )+ len (node5ips ) != 6 {
1180
1186
t .Fatalf ("Bad IP allocation: %#v" , allocation )
1181
1187
}
1182
1188
updateAllocations (eit , allocation )
You can’t perform that action at this time.
0 commit comments