We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 679bac0 commit dfb5536Copy full SHA for dfb5536
CHANGES.rst
@@ -6,6 +6,8 @@ pytest-mqtt changelog
6
in progress
7
===========
8
9
+- Improve error handling when Docker daemon is not running. Thanks, @horta.
10
+
11
12
2023-03-15 0.2.0
13
================
pytest_mqtt/mosquitto.py
@@ -55,6 +55,12 @@ def pull_image(self):
55
docker_client.images.pull(image_name)
56
57
def run(self):
58
+ docker_client = docker.from_env(version=self.docker_version)
59
+ docker_url = docker_client.api.base_url
60
+ try:
61
+ docker_client.ping()
62
+ except Exception:
63
+ raise ConnectionError(f"Cannot connect to the Docker daemon at {docker_url}. Is the docker daemon running?")
64
self.pull_image()
65
return super(Mosquitto, self).run()
66
0 commit comments