Skip to content

Commit

Permalink
add docker error
Browse files Browse the repository at this point in the history
  • Loading branch information
iTrooz authored and azubieta committed Jul 5, 2022
1 parent d0df74e commit d3a21d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion appimagebuilder/commands/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from appimagebuilder.modules.test import ExecutionTest, TestFailed
from ..context import Context

import docker
from docker.errors import DockerException

class RunTestCommand(Command):
def __init__(self, context: Context, tests_settings: Roamer):
Expand All @@ -28,7 +30,14 @@ def id(self):
return "test"

def __call__(self, *args, **kwargs):
test_cases = self._load_tests(self.tests_settings())
try:
test_cases = self._load_tests(self.tests_settings())
except DockerException as e:
logging.error("Docker error : "+str(e))
logging.error("(Is docker installed/started ?)")
logging.error("Tests will be skipped")
return

try:
for test in test_cases:
test.run()
Expand Down

0 comments on commit d3a21d3

Please sign in to comment.