8000 integration: check_duplicate is now the default behavior · docker/docker-py@92c714a · GitHub
[go: up one dir, main page]

Skip to content

Commit 92c714a

Browse files
committed
integration: check_duplicate is now the default behavior
moby/moby#46251 marks CheckDuplicate as deprecated. Any NetworkCreate request with a conflicting network name will now return an error. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
1 parent 0f0b20a commit 92c714a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/integration/api_network_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,9 @@ def test_create_with_links(self):
325325

326326
def test_create_check_duplicate(self):
327327
net_name, net_id = self.create_network()
328+
self.tmp_networks.append(net_id)
328329
with pytest.raises(docker.errors.APIError):
329330
self.client.create_network(net_name, check_duplicate=True)
330-
net_id = self.client.create_network(net_name, check_duplicate=False)
331-
self.tmp_networks.append(net_id['Id'])
332331

333332
@requires_api_version('1.22')
334333
def test_connect_with_links(self):

0 commit comments

Comments
 (0)
0