From aa793a08279ce83099d6ac9e0af1068c10605eb7 Mon Sep 17 00:00:00 2001 From: Albin Kerouanton Date: Mon, 7 Aug 2023 11:11:39 +0200 Subject: [PATCH] integration: Fix bad subnet declaration 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 --- tests/integration/api_network_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/api_network_test.py b/tests/integration/api_network_test.py index 78d54e282..74dad6005 100644 --- a/tests/integration/api_network_test.py +++ b/tests/integration/api_network_test.py @@ -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( @@ -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" ) ] @@ -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" ) ]