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
53d51edc
Commit
53d51edc
authored
12 years ago
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into slapgrid_test
Conflicts: slapos/tests/slapgrid.py
parents
9bedce75
7b3cbc2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+8
-9
No files found.
slapos/tests/slapgrid.py
View file @
53d51edc
...
...
@@ -38,6 +38,7 @@ class BasicMixin:
self
.
supervisord_configuration_path
,
self
.
usage_report_periodicity
,
self
.
buildout
,
develop
=
develop
)
def
tearDown
(
self
):
# XXX: Hardcoded pid, as it is not configurable in slapos
svc
=
os
.
path
.
join
(
self
.
instance_root
,
'var'
,
'run'
,
'supervisord.pid'
)
...
...
@@ -177,8 +178,6 @@ def _server_response (self_test,_requested_state,timestamp=None):
return
server_response
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
.
TestCase
):
def
test_nothing_to_do
(
self
):
...
...
@@ -203,7 +202,6 @@ class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase):
self
.
assertSortedListEqual
(
os
.
listdir
(
self
.
software_root
),
[])
def
test_one_partition
(
self
):
self
.
sequence
=
[]
httplib
.
HTTPConnection
.
_callback
=
_server_response
(
self
,
_requested_state
=
'stopped'
)
...
...
@@ -235,11 +233,9 @@ touch worked""")
'stoppedComputerPartition'
])
def
test_one_partition_started
(
self
):
self
.
sequence
=
[]
self
.
started
=
False
httplib
.
HTTPConnection
.
_callback
=
_server_response
(
self
,
'started'
)
os
.
mkdir
(
self
.
software_root
)
os
.
mkdir
(
self
.
instance_root
)
partition_path
=
os
.
path
.
join
(
self
.
instance_root
,
'0'
)
...
...
@@ -281,7 +277,6 @@ chmod 755 etc/run/wrapper
def
test_one_partition_started_stopped
(
self
):
self
.
started
=
True
self
.
sequence
=
[]
httplib
.
HTTPConnection
.
_callback
=
_server_response
(
self
,
'started'
)
...
...
@@ -363,7 +358,6 @@ chmod 755 etc/run/wrapper
def
test_one_partition_stopped_started
(
self
):
self
.
stopped
=
False
self
.
sequence
=
[]
httplib
.
HTTPConnection
.
_callback
=
_server_response
(
self
,
'stopped'
)
...
...
@@ -635,8 +629,6 @@ touch worked""")
'availableComputerPartition'
,
'stoppedComputerPartition'
,])
class
TestSlapgridArgumentTuple
(
unittest
.
TestCase
):
"""
"""
...
...
@@ -1177,10 +1169,17 @@ fi""" % {'worked_file': worked_file, 'lockfile': lockfile})
with
open
(
promise
,
'w'
)
as
f
:
f
.
write
(
"""#!/usr/bin/env sh
touch "%(worked_file)s"
<<<<<<< HEAD
if [ ! -f %(lockfile)s ]
then
touch "%(lockfile)s"
else
=======
if [ ! -f %(lockfile)s ]
then
touch "%(lockfile)s"
else
>>>>>>> master
sleep 5
fi
exit 0"""
%
{
'worked_file'
:
worked_file
,
'lockfile'
:
lockfile
})
...
...
This diff is collapsed.
Click to expand it.
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