Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
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
Commits
5a396de9
Commit
5a396de9
authored
Dec 01, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/monitor/test: fix some ResourceWarnings
parent
667d73b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
software/monitor/test/test.py
software/monitor/test/test.py
+15
-13
No files found.
software/monitor/test/test.py
View file @
5a396de9
...
@@ -163,17 +163,18 @@ class EdgeMixin(object):
...
@@ -163,17 +163,18 @@ class EdgeMixin(object):
)
)
for
instance_reference
in
self
.
surykatka_dict
:
for
instance_reference
in
self
.
surykatka_dict
:
for
info_dict
in
self
.
surykatka_dict
[
instance_reference
].
values
():
for
info_dict
in
self
.
surykatka_dict
[
instance_reference
].
values
():
with
open
(
info_dict
[
'ini-file'
])
as
f
:
self
.
assertEqual
(
self
.
assertEqual
(
info_dict
[
'expected_ini'
].
strip
()
%
info_dict
,
info_dict
[
'expected_ini'
].
strip
()
%
info_dict
,
open
(
info_dict
[
'ini-file'
])
.
read
().
strip
()
f
.
read
().
strip
()
)
)
def
assertPromiseContent
(
self
,
instance_reference
,
name
,
content
):
def
assertPromiseContent
(
self
,
instance_reference
,
name
,
content
):
promise
=
open
(
with
open
(
os
.
path
.
join
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
instance_reference
,
'etc'
,
'plugin'
,
name
self
.
slap
.
instance_directory
,
instance_reference
,
'etc'
,
'plugin'
,
name
)).
read
().
strip
()
))
as
f
:
promise
=
f
.
read
().
strip
()
self
.
assertTrue
(
content
in
promise
)
self
.
assertTrue
(
content
in
promise
)
def
assertSurykatkaBotPromise
(
self
):
def
assertSurykatkaBotPromise
(
self
):
...
@@ -191,9 +192,10 @@ class EdgeMixin(object):
...
@@ -191,9 +192,10 @@ class EdgeMixin(object):
def
assertSurykatkaCron
(
self
):
def
assertSurykatkaCron
(
self
):
for
instance_reference
in
self
.
surykatka_dict
:
for
instance_reference
in
self
.
surykatka_dict
:
for
info_dict
in
self
.
surykatka_dict
[
instance_reference
].
values
():
for
info_dict
in
self
.
surykatka_dict
[
instance_reference
].
values
():
with
open
(
info_dict
[
'status-cron'
])
as
f
:
self
.
assertEqual
(
self
.
assertEqual
(
'*/2 * * * * %s'
%
(
info_dict
[
'status-json'
],),
'*/2 * * * * %s'
%
(
info_dict
[
'status-json'
],),
open
(
info_dict
[
'status-cron'
])
.
read
().
strip
()
f
.
read
().
strip
()
)
)
def
initiateSurykatkaRun
(
self
):
def
initiateSurykatkaRun
(
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