Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
59aa6791
Commit
59aa6791
authored
Mar 13, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Provide more information in case of plugin failure
parent
c9f91fbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+7
-1
No files found.
software/caddy-frontend/test/test.py
View file @
59aa6791
...
@@ -364,6 +364,7 @@ class TestDataMixin(object):
...
@@ -364,6 +364,7 @@ class TestDataMixin(object):
self
.
software_path
,
'bin'
,
'monitor.runpromise'
)
self
.
software_path
,
'bin'
,
'monitor.runpromise'
)
partition_path_list
=
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
))
partition_path_list
=
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
))
promise_status_list
=
[]
promise_status_list
=
[]
msg
=
[]
for
partition_path
in
sorted
(
partition_path_list
):
for
partition_path
in
sorted
(
partition_path_list
):
plugin_path_list
=
sorted
(
glob
.
glob
(
plugin_path_list
=
sorted
(
glob
.
glob
(
os
.
path
.
join
(
partition_path
,
'etc'
,
'plugin'
,
'*.py'
)
os
.
path
.
join
(
partition_path
,
'etc'
,
'plugin'
,
'*.py'
)
...
@@ -382,12 +383,17 @@ class TestDataMixin(object):
...
@@ -382,12 +383,17 @@ class TestDataMixin(object):
# sanity check
# sanity check
if
'Checking promise %s'
%
plugin
not
in
plugin_result
:
if
'Checking promise %s'
%
plugin
not
in
plugin_result
:
plugin_status
=
1
plugin_status
=
1
msg
.
append
(
plugin_result
)
promise_status_list
.
append
(
promise_status_list
.
append
(
'%s: %s'
%
(
'%s: %s'
%
(
plugin_path
[
len
(
self
.
instance_path
)
+
1
:],
plugin_path
[
len
(
self
.
instance_path
)
+
1
:],
plugin_status
==
0
and
'OK'
or
'ERROR'
))
plugin_status
==
0
and
'OK'
or
'ERROR'
))
self
.
assertTestData
(
'
\
n
'
.
join
(
promise_status_list
))
if
msg
:
msg
=
''
.
join
(
msg
)
else
:
msg
=
None
self
.
assertTestData
(
'
\
n
'
.
join
(
promise_status_list
),
msg
=
msg
)
def
test_promise_run_promise
(
self
):
def
test_promise_run_promise
(
self
):
partition_path_list
=
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
))
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