Skip to content

Commit

Permalink
integration: Fix bad subnet declaration
Browse files Browse the repository at this point in the history
Some network integration tests are creating networks with subnet
`2001:389::1/64`. This is an invalid subnet as the host fragment is
non-zero (ie. it should be `2001:389::/64`).

PR moby/moby#45759 is adding strict validation of network configuration.
Docker API will now return an error whenever a bad subnet is passed.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
  • Loading branch information
akerouanton committed Aug 19, 2023
1 parent 0f0b20a commit aa793a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/api_network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def test_create_with_ipv6_address(self):
net_name, net_id = self.create_network(
ipam=IPAMConfig(
driver='default',
pool_configs=[IPAMPool(subnet="2001:389::1/64")],
pool_configs=[IPAMPool(subnet="2001:389::/64")],
),
)
container = self.client.create_container(
Expand Down Expand Up @@ -389,7 +389,7 @@ def test_connect_with_ipv6_address(self):
driver='default',
pool_configs=[
IPAMPool(
subnet="2001:389::1/64", iprange="2001:389::0/96",
subnet="2001:389::/64", iprange="2001:389::0/96",
gateway="2001:389::ffff"
)
]
Expand Down Expand Up @@ -455,7 +455,7 @@ def test_create_network_ipv6_enabled(self):
driver='default',
pool_configs=[
IPAMPool(
subnet="2001:389::1/64", iprange="2001:389::0/96",
subnet="2001:389::/64", iprange="2001:389::0/96",
gateway="2001:389::ffff"
)
]
Expand Down

0 comments on commit aa793a0

Please sign in to comment.