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
103
Merge Requests
103
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
6db6993a
Commit
6db6993a
authored
Sep 12, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/monitor/test: fix some ResourceWarning
parent
9abe14c8
Pipeline
#23479
failed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
software/monitor/test/test.py
software/monitor/test/test.py
+14
-12
No files found.
software/monitor/test/test.py
View file @
6db6993a
...
@@ -162,18 +162,19 @@ class EdgeMixin(object):
...
@@ -162,18 +162,19 @@ 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
():
self
.
assertEqual
(
with
open
(
info_dict
[
'ini-file'
])
as
fh
:
info_dict
[
'expected_ini'
].
strip
()
%
info_dict
,
self
.
assertEqual
(
open
(
info_dict
[
'ini-file'
]).
read
().
strip
()
info_dict
[
'expected_ini'
].
strip
()
%
info_dict
,
)
fh
.
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
fh
:
promise
=
fh
.
read
().
strip
()
self
.
assert
True
(
content
in
promise
)
self
.
assert
In
(
content
,
promise
)
def
assertSurykatkaBotPromise
(
self
):
def
assertSurykatkaBotPromise
(
self
):
for
instance_reference
in
self
.
surykatka_dict
:
for
instance_reference
in
self
.
surykatka_dict
:
...
@@ -190,10 +191,11 @@ class EdgeMixin(object):
...
@@ -190,10 +191,11 @@ 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
():
self
.
assertEqual
(
with
open
(
info_dict
[
'status-cron'
])
as
fh
:
'*/2 * * * * %s'
%
(
info_dict
[
'status-json'
],),
self
.
assertEqual
(
open
(
info_dict
[
'status-cron'
]).
read
().
strip
()
'*/2 * * * * %s'
%
(
info_dict
[
'status-json'
],),
)
fh
.
read
().
strip
()
)
def
initiateSurykatkaRun
(
self
):
def
initiateSurykatkaRun
(
self
):
try
:
try
:
...
...
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