Add TC to check dyanmic subnet for ingress network

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit e2b5ac75a393f6942c37efdd888fc3bc761de244)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Arko Dasgupta 2019-09-19 18:12:59 -07:00 committed by Sebastiaan van Stijn
parent 0c38d56a6d
commit 12e7d99439
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -417,6 +417,12 @@ func TestServiceWithDefaultAddressPoolInit(t *testing.T) {
assert.NilError(t, err)
t.Logf("%s: NetworkInspect: %+v", t.Name(), out)
assert.Assert(t, len(out.IPAM.Config) > 0)
assert.Equal(t, out.IPAM.Config[0].Subnet, "20.20.1.0/24")
// Also inspect ingress network and make sure its in the same subnet
out, err = cli.NetworkInspect(ctx, "ingress", types.NetworkInspectOptions{Verbose: true})
assert.NilError(t, err)
assert.Assert(t, len(out.IPAM.Config) > 0)
assert.Equal(t, out.IPAM.Config[0].Subnet, "20.20.0.0/24")
err = cli.ServiceRemove(ctx, serviceID)