Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
296ad8e6
Commit
296ad8e6
authored
Mar 13, 2019
by
Łukasz Nowak
Committed by
Łukasz Nowak
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Provide more information in case of plugin failure
parent
e381c05b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+8
-1
No files found.
software/caddy-frontend/test/test.py
View file @
296ad8e6
...
...
@@ -364,6 +364,7 @@ class TestDataMixin(object):
self
.
software_path
,
'bin'
,
'monitor.runpromise'
)
partition_path_list
=
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
))
promise_status_list
=
[]
msg
=
[]
for
partition_path
in
sorted
(
partition_path_list
):
plugin_path_list
=
sorted
(
glob
.
glob
(
os
.
path
.
join
(
partition_path
,
'etc'
,
'plugin'
,
'*.py'
)
...
...
@@ -379,15 +380,21 @@ class TestDataMixin(object):
'-c'
,
monitor_conf
,
'--run-only'
,
plugin
])
if
plugin_status
==
1
:
msg
.
append
(
plugin_result
)
# sanity check
if
'Checking promise %s'
%
plugin
not
in
plugin_result
:
plugin_status
=
1
msg
.
append
(
plugin_result
)
promise_status_list
.
append
(
'%s: %s'
%
(
plugin_path
[
len
(
self
.
instance_path
)
+
1
:],
plugin_status
==
0
and
'OK'
or
'ERROR'
))
self
.
assertTestData
(
'
\
n
'
.
join
(
promise_status_list
))
if
msg
:
msg
=
''
.
join
(
msg
).
strip
()
self
.
assertTestData
(
'
\
n
'
.
join
(
promise_status_list
),
msg
=
(
msg
or
None
))
def
test_promise_run_promise
(
self
):
partition_path_list
=
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
))
...
...
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