Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.toolbox
Commits
bd5062b4
Commit
bd5062b4
authored
Dec 05, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise/monitor_bootstrap: Consider not run bootstrap as failure
/reviewed-on
!68
parent
05582c0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
slapos/promise/plugin/monitor_bootstrap_status.py
slapos/promise/plugin/monitor_bootstrap_status.py
+1
-1
slapos/test/promise/plugin/test_monitor_bootstrap_status.py
slapos/test/promise/plugin/test_monitor_bootstrap_status.py
+3
-2
No files found.
slapos/promise/plugin/monitor_bootstrap_status.py
View file @
bd5062b4
...
...
@@ -16,7 +16,7 @@ class RunPromise(GenericPromise):
def
sense
(
self
):
process_pid_file
=
self
.
getConfig
(
'process-pid-file'
)
if
not
os
.
path
.
exists
(
process_pid_file
):
self
.
logger
.
info
(
"Bootstrap didn't run!"
)
self
.
logger
.
error
(
"Bootstrap didn't run!"
)
return
with
open
(
process_pid_file
)
as
f
:
...
...
slapos/test/promise/plugin/test_monitor_bootstrap_status.py
View file @
bd5062b4
...
...
@@ -65,9 +65,10 @@ extra_config_dict = {
def
test_monitor_bootstrap_no_run
(
self
):
self
.
configureLauncher
()
self
.
launcher
.
run
()
with
self
.
assertRaises
(
PromiseError
):
self
.
launcher
.
run
()
result
=
self
.
getPromiseResult
(
self
.
promise_name
)
self
.
assertEqual
(
result
[
'result'
][
'failed'
],
Fals
e
)
self
.
assertEqual
(
result
[
'result'
][
'failed'
],
Tru
e
)
self
.
assertEqual
(
result
[
'result'
][
'message'
],
"Bootstrap didn't run!"
)
def
test_monitor_bootstrap_ok
(
self
):
...
...
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