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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
slapos
Commits
3c4bbcdf
Commit
3c4bbcdf
authored
Dec 24, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor/test: clean up
parent
985f6159
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
software/monitor/test/test.py
software/monitor/test/test.py
+5
-8
No files found.
software/monitor/test/test.py
View file @
3c4bbcdf
...
...
@@ -29,6 +29,7 @@ import json
import
os
import
re
import
requests
import
subprocess
import
xml.etree.ElementTree
as
ET
from
slapos.recipe.librecipe
import
generateHashFromFiles
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
...
@@ -225,17 +226,13 @@ class EdgeSlaveMixin(MonitorTestMixin):
def
assertSurykatkaStatusJSON
(
self
):
if
os
.
path
.
exists
(
self
.
surykatka_json
):
os
.
unlink
(
self
.
surykatka_json
)
original_environ
=
os
.
environ
.
copy
()
os
.
environ
.
pop
(
'PYTHONPATH'
,
None
)
try
:
self
.
assertEqual
(
0
,
os
.
system
(
self
.
surykatka_status_json
))
finally
:
os
.
environ
=
original_environ
env
=
os
.
environ
.
copy
()
env
.
pop
(
'PYTHONPATH'
,
None
)
subprocess
.
check_call
(
self
.
surykatka_status_json
,
shell
=
True
,
env
=
env
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
surykatka_json
))
with
open
(
self
.
surykatka_json
)
as
fh
:
status_json
=
json
.
load
(
fh
)
self
.
assert
True
(
'bot_status'
in
status_json
)
self
.
assert
In
(
'bot_status'
,
status_json
)
def
test
(
self
):
# Note: Those tests do not run surykatka and do not do real checks, as
...
...
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