Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
c8e16881
Commit
c8e16881
authored
Dec 07, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/utils: log crontab output when execution fail
parent
2fa78884
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
slapos/testing/utils.py
slapos/testing/utils.py
+11
-5
No files found.
slapos/testing/utils.py
View file @
c8e16881
...
@@ -218,10 +218,16 @@ class CrontabMixin(object):
...
@@ -218,10 +218,16 @@ class CrontabMixin(object):
be a relative time.
be a relative time.
"""
"""
crontab_command
=
self
.
_getCrontabCommand
(
crontab_name
)
crontab_command
=
self
.
_getCrontabCommand
(
crontab_name
)
try
:
crontab_output
=
subprocess
.
check_output
(
crontab_output
=
subprocess
.
check_output
(
"faketime {date} bash -o pipefail -e -c '{crontab_command}'"
.
format
(
**
locals
()),
"faketime {date} bash -o pipefail -e -c '{crontab_command}'"
.
format
(
**
locals
()),
shell
=
True
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
,
)
)
except
subprocess
.
CalledProcessError
as
e
:
self
.
logger
.
debug
(
'error executing crontab %s output: %s'
,
crontab_command
,
e
.
output
)
raise
else
:
self
.
logger
.
debug
(
"crontab %s output: %s"
,
crontab_command
,
crontab_output
)
self
.
logger
.
debug
(
"crontab %s output: %s"
,
crontab_command
,
crontab_output
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment