Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions framework/python/src/core/testrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from net_orc import network_orchestrator as net_orc
from test_orc import test_orchestrator as test_orc

from docker.errors import ImageNotFound

# Locate parent directory
current_dir = os.path.dirname(os.path.realpath(__file__))

Expand Down Expand Up @@ -430,16 +432,22 @@ def start_ui(self):

client = docker.from_env()

client.containers.run(
image='test-run/ui',
auto_remove=True,
name='tr-ui',
hostname='testrun.io',
detach=True,
ports={
'80': 8080
}
)
try:
client.containers.run(
image='test-run/ui',
auto_remove=True,
name='tr-ui',
hostname='testrun.io',
detach=True,
ports={
'80': 8080
}
)
except ImageNotFound as ie:
LOGGER.error('An error occured whilst starting the UI. ' +
'Please investigate and try again.')
LOGGER.error(ie)
sys.exit(1)

# TODO: Make port configurable
LOGGER.info('User interface is ready on http://localhost:8080')
Expand Down