Closed vdelendik closed 7 months ago
To check this enhancement you need to change Dockerfile variables before build:
ENV DEBUG=true
ENV DEBUG_TIMEOUT=3600
ENV VERBOSE=true
or run an already built container with --env
args:
docker run -d --env DEBUG=true --env VERBOSE=true ... IMAGE [COMMAND] [ARG...]
after that you need to broke some code to provoke container to exit (in usual situation) and check that container has not exited. Also you need to check logs for verbose output.
Debug and Verbose mods are present, but we catch log issue /opt/debug.sh: line 12: 3600: command not found
log:
docker run --env DEBUG=true --env VERBOSE=true public.ecr.aws/zebrunner/mcloud-device:2.6.4-beta17
/opt/debug.sh: line 12: 3600: command not found
+ [[ -z '' ]]
+ echo 'Exiting without restart as one of important setting is missed!'
+ exit 0
+ echo 'Exit attempt intercepted. Sleep for 3600 seconds activated!'
+ sleep 3600
#######################################################
# #
# DEBUG mode is on! #
# #
#######################################################
#######################################################
# #
# VERBOSE mode is on! #
# #
#######################################################
Exiting without restart as one of important setting is missed!
Exit attempt intercepted. Sleep for 3600 seconds activated!
fixed
Verified. Tested on public.ecr.aws/zebrunner/mcloud-device:2.6.4-beta17
in case of any problem we do have device containers in restarting state:
let's introduce new DEBUG mode which allow us to stay at the end so user can bash into the container and test all kind of infrastructure settings. Ideally it should be organized via start command argument.
if
DEBUG=true
we should prohibit exit and restart and stay as is... The same should be implemented for appium container