Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
81b74b86
Commit
81b74b86
authored
Aug 10, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'promises' of
https://git.erp5.org/repos/slapos.core
into promises
parents
8cedfd1f
acba79ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+13
-12
No files found.
slapos/tests/slapgrid.py
View file @
81b74b86
...
@@ -36,6 +36,15 @@ class BasicMixin:
...
@@ -36,6 +36,15 @@ class BasicMixin:
self
.
buildout
)
self
.
buildout
)
def
tearDown
(
self
):
def
tearDown
(
self
):
# XXX: Hardcoded pid, as it is not configurable in slapos
svc
=
os
.
path
.
join
(
self
.
instance_root
,
'var'
,
'run'
,
'supervisord.pid'
)
if
os
.
path
.
exists
(
svc
):
try
:
pid
=
int
(
open
(
svc
).
read
().
strip
())
except
ValueError
:
pass
else
:
os
.
kill
(
pid
,
signal
.
SIGTERM
)
shutil
.
rmtree
(
self
.
_tempdir
,
True
)
shutil
.
rmtree
(
self
.
_tempdir
,
True
)
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
.
TestCase
):
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
.
TestCase
):
...
@@ -99,15 +108,6 @@ touch worked""")
...
@@ -99,15 +108,6 @@ touch worked""")
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
_unpatchHttplib
()
self
.
_unpatchHttplib
()
# XXX: Hardcoded pid, as it is not configurable in slapos
svc
=
os
.
path
.
join
(
self
.
instance_root
,
'var'
,
'run'
,
'supervisord.pid'
)
if
os
.
path
.
exists
(
svc
):
try
:
pid
=
int
(
open
(
svc
).
read
().
strip
())
except
ValueError
:
pass
else
:
os
.
kill
(
pid
,
signal
.
SIGTERM
)
BasicMixin
.
tearDown
(
self
)
BasicMixin
.
tearDown
(
self
)
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
.
TestCase
):
...
@@ -329,13 +329,14 @@ chmod 755 etc/run/wrapper
...
@@ -329,13 +329,14 @@ chmod 755 etc/run/wrapper
self
.
assertSortedListEqual
(
os
.
listdir
(
partition_path
),
[
'.0_wrapper.log'
,
self
.
assertSortedListEqual
(
os
.
listdir
(
partition_path
),
[
'.0_wrapper.log'
,
'.0_wrapper.log.1'
,
'worked'
,
'buildout.cfg'
,
'etc'
])
'.0_wrapper.log.1'
,
'worked'
,
'buildout.cfg'
,
'etc'
])
tries
=
10
tries
=
10
expected_text
=
'Signal handler called with signal 15'
while
tries
>
0
:
while
tries
>
0
:
tries
-=
1
tries
-=
1
if
os
.
path
.
getsize
(
wrapper_log
)
>
last_size
:
found
=
expected_text
in
open
(
wrapper_log
,
'r'
).
read
()
if
found
:
break
break
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
self
.
assertTrue
(
'Signal handler called with signal 15'
in
self
.
assertTrue
(
found
)
open
(
wrapper_log
,
'r'
).
read
())
def
test_one_partition_stopped_started
(
self
):
def
test_one_partition_stopped_started
(
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