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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
d8410ba1
Commit
d8410ba1
authored
Jun 25, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup buildout fake binary to be readable.
parent
1b45e7c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+13
-8
No files found.
slapos/tests/slapgrid.py
View file @
d8410ba1
...
@@ -814,18 +814,23 @@ class TestSlapgridCPWithMasterWatchdog(MasterMixin, unittest.TestCase):
...
@@ -814,18 +814,23 @@ class TestSlapgridCPWithMasterWatchdog(MasterMixin, unittest.TestCase):
partition
=
computer
.
instance_list
[
0
]
partition
=
computer
.
instance_list
[
0
]
partition
.
requested_state
=
'started'
partition
.
requested_state
=
'started'
RUN_CONTENT
=
textwrap
.
dedent
(
"""
\
# Content of run wrapper
#!/bin/sh
WRAPPER_CONTENT
=
textwrap
.
dedent
(
"""#!/bin/sh
touch ./launched
touch ./crashed
echo Failing
sleep 1
exit 111
"""
)
BUILDOUT_RUN_CONTENT
=
textwrap
.
dedent
(
"""#!/bin/sh
mkdir -p etc/run &&
mkdir -p etc/run &&
echo "#!/bin/sh" > etc/run/daemon &&
echo "%s" >> etc/run/daemon &&
echo "touch launched
touch ./crashed; echo Failing; sleep 1; exit 111;
" >> etc/run/daemon &&
chmod 755 etc/run/daemon &&
chmod 755 etc/run/daemon &&
touch worked
touch worked
"""
)
"""
%
WRAPPER_CONTENT
)
partition
.
software
.
setBuildout
(
RUN_CONTENT
)
partition
.
software
.
setBuildout
(
BUILDOUT_
RUN_CONTENT
)
self
.
assertEqual
(
self
.
grid
.
processComputerPartitionList
(),
slapgrid
.
SLAPGRID_SUCCESS
)
self
.
assertEqual
(
self
.
grid
.
processComputerPartitionList
(),
slapgrid
.
SLAPGRID_SUCCESS
)
self
.
assertItemsEqual
(
os
.
listdir
(
self
.
instance_root
),
self
.
assertItemsEqual
(
os
.
listdir
(
self
.
instance_root
),
...
...
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