Show an error on 'run' when there are legacy one-off containers
Also warn the user about the one-off containers in the standard error message about legacy containers. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
fc8f564558
commit
e98caf5cf9
6 changed files with 221 additions and 38 deletions
|
|
@ -97,7 +97,7 @@ class CLITestCase(unittest.TestCase):
|
|||
def test_run_with_environment_merged_with_options_list(self, mock_dockerpty):
|
||||
command = TopLevelCommand()
|
||||
mock_client = mock.create_autospec(docker.Client)
|
||||
mock_project = mock.Mock()
|
||||
mock_project = mock.Mock(client=mock_client)
|
||||
mock_project.get_service.return_value = Service(
|
||||
'service',
|
||||
client=mock_client,
|
||||
|
|
@ -126,7 +126,7 @@ class CLITestCase(unittest.TestCase):
|
|||
def test_run_service_with_restart_always(self):
|
||||
command = TopLevelCommand()
|
||||
mock_client = mock.create_autospec(docker.Client)
|
||||
mock_project = mock.Mock()
|
||||
mock_project = mock.Mock(client=mock_client)
|
||||
mock_project.get_service.return_value = Service(
|
||||
'service',
|
||||
client=mock_client,
|
||||
|
|
@ -150,7 +150,7 @@ class CLITestCase(unittest.TestCase):
|
|||
|
||||
command = TopLevelCommand()
|
||||
mock_client = mock.create_autospec(docker.Client)
|
||||
mock_project = mock.Mock()
|
||||
mock_project = mock.Mock(client=mock_client)
|
||||
mock_project.get_service.return_value = Service(
|
||||
'service',
|
||||
client=mock_client,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue