Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit a53e379

Browse files
Arko DasguptathaJeztah
authored andcommitted
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> Upstream-commit: 12e7d99439917b44a173e5326798365870bbbc90 Component: engine
1 parent 6c02751 commit a53e379

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

components/engine/integration/network/service_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ func TestServiceWithDefaultAddressPoolInit(t *testing.T) {
417417
assert.NilError(t, err)
418418
t.Logf("%s: NetworkInspect: %+v", t.Name(), out)
419419
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)
420426
assert.Equal(t, out.IPAM.Config[0].Subnet, "20.20.0.0/24")
421427

422428
err = cli.ServiceRemove(ctx, serviceID)

0 commit comments

Comments
 (0)