Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit e2b5ac75a393f6942c37efdd888fc3bc761de244)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
... | ... |
@@ -417,6 +417,12 @@ func TestServiceWithDefaultAddressPoolInit(t *testing.T) { |
417 | 417 |
assert.NilError(t, err) |
418 | 418 |
t.Logf("%s: NetworkInspect: %+v", t.Name(), out) |
419 | 419 |
assert.Assert(t, len(out.IPAM.Config) > 0) |
420 |
+ assert.Equal(t, out.IPAM.Config[0].Subnet, "20.20.1.0/24") |
|
421 |
+ |
|
422 |
+ // Also inspect ingress network and make sure its in the same subnet |
|
423 |
+ out, err = cli.NetworkInspect(ctx, "ingress", types.NetworkInspectOptions{Verbose: true}) |
|
424 |
+ assert.NilError(t, err) |
|
425 |
+ assert.Assert(t, len(out.IPAM.Config) > 0) |
|
420 | 426 |
assert.Equal(t, out.IPAM.Config[0].Subnet, "20.20.0.0/24") |
421 | 427 |
|
422 | 428 |
err = cli.ServiceRemove(ctx, serviceID) |