mirror of
https://github.com/docker/compose.git
synced 2026-08-31 06:49:15 +00:00
Network label mismatch now prints a warning instead of raising an error
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
972fe65830
commit
2ba9cd73d1
2 changed files with 10 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import pytest
|
||||
|
||||
from .. import mock
|
||||
from .. import unittest
|
||||
from compose.network import check_remote_network_config
|
||||
from compose.network import Network
|
||||
|
|
@ -152,7 +153,9 @@ class NetworkTest(unittest.TestCase):
|
|||
'com.project.touhou.character': 'marisa.kirisame',
|
||||
}
|
||||
}
|
||||
with pytest.raises(NetworkConfigChangedError) as e:
|
||||
with mock.patch('compose.network.log') as mock_log:
|
||||
check_remote_network_config(remote, net)
|
||||
|
||||
assert 'label "com.project.touhou.character" has changed' in str(e.value)
|
||||
mock_log.warn.assert_called_once_with(mock.ANY)
|
||||
_, args, kwargs = mock_log.warn.mock_calls[0]
|
||||
assert 'label "com.project.touhou.character" has changed' in args[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue