Handle connection errors on project initialization
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
6ce066274e
commit
b3a4d76d4f
3 changed files with 21 additions and 1 deletions
|
|
@ -154,6 +154,19 @@ class CLITestCase(DockerClientTestCase):
|
|||
returncode=0
|
||||
)
|
||||
|
||||
def test_host_not_reachable(self):
|
||||
result = self.dispatch(['-H=tcp://doesnotexist:8000', 'ps'], returncode=1)
|
||||
assert "Couldn't connect to Docker daemon" in result.stderr
|
||||
|
||||
def test_host_not_reachable_volumes_from_container(self):
|
||||
self.base_dir = 'tests/fixtures/volumes-from-container'
|
||||
|
||||
container = self.client.create_container('busybox', 'true', name='composetest_data_container')
|
||||
self.addCleanup(self.client.remove_container, container)
|
||||
|
||||
result = self.dispatch(['-H=tcp://doesnotexist:8000', 'ps'], returncode=1)
|
||||
assert "Couldn't connect to Docker daemon" in result.stderr
|
||||
|
||||
def test_config_list_services(self):
|
||||
self.base_dir = 'tests/fixtures/v2-full'
|
||||
result = self.dispatch(['config', '--services'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue