Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Lisa Casino
slapos.toolbox
Commits
c97ea9e7
Commit
c97ea9e7
authored
Nov 14, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resilient: reproduce better the folder tree of a webrunner
parent
32ef27cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
slapos/resilient/runner_utils.py
slapos/resilient/runner_utils.py
+1
-1
slapos/test/test_runner_exporter.py
slapos/test/test_runner_exporter.py
+9
-9
No files found.
slapos/resilient/runner_utils.py
View file @
c97ea9e7
...
...
@@ -115,7 +115,7 @@ def writeSignatureFile(slappart_signature_method_dict, runner_working_path, sign
slappart_signature_method_dict
[
special_slappart
]
)
if
dirpath
.
startswith
(
special_slappart
):
if
dirpath
.
startswith
(
'./'
+
os
.
path
.
relpath
(
os
.
path
.
join
(
'./runner'
,
special_slappart
))
):
signature_process
=
subprocess
.
Popen
(
backup_identity_script_path
,
stdin
=
subprocess
.
PIPE
,
...
...
slapos/test/test_runner_exporter.py
View file @
c97ea9e7
...
...
@@ -172,13 +172,13 @@ class TestRunnerExporter(unittest.TestCase):
def
test_writeSignatureFile
(
self
):
self
.
_setUpFakeInstanceFolder
()
os
.
makedirs
(
'backup/
instance/
etc'
)
os
.
makedirs
(
'backup/instance/slappart0'
)
os
.
makedirs
(
'backup/instance/slappart1'
)
os
.
makedirs
(
'backup/etc'
)
os
.
makedirs
(
'backup/
runner/
instance/slappart0'
)
os
.
makedirs
(
'backup/
runner/
instance/slappart1'
)
self
.
_createFile
(
'backup/
instance/
etc/.project'
,
'workspace/slapos-dev/software/erp5'
)
self
.
_createFile
(
'backup/instance/slappart0/data'
,
'hello'
)
self
.
_createFile
(
'backup/instance/slappart1/data'
,
'world'
)
self
.
_createFile
(
'backup/etc/.project'
,
'workspace/slapos-dev/software/erp5'
)
self
.
_createFile
(
'backup/
runner/
instance/slappart0/data'
,
'hello'
)
self
.
_createFile
(
'backup/
runner/
instance/slappart1/data'
,
'world'
)
slappart_signature_method_dict
=
{
'./instance/slappart1'
:
'./instance/slappart1/srv/.backup_identity_script'
,
...
...
@@ -191,9 +191,9 @@ class TestRunnerExporter(unittest.TestCase):
signature_file_content
=
f
.
read
()
# Slappart1 is using md5sum as signature, others are using sha256sum (default)
self
.
assertEqual
(
signature_file_content
,
"""2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 ./instance/slappart0/data
49b74873d57ff0307b7c9364e2fe2a3876d8722fbe7ce3a6f1438d47647a86f4 ./
instance/
etc/.project
7d793037a0760186574b0282f2f435e7 ./instance/slappart1/data"""
)
self
.
assertEqual
(
signature_file_content
,
"""2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 ./
runner/
instance/slappart0/data
49b74873d57ff0307b7c9364e2fe2a3876d8722fbe7ce3a6f1438d47647a86f4 ./etc/.project
7d793037a0760186574b0282f2f435e7 ./
runner/
instance/slappart1/data"""
)
def
test_backupFilesWereModifiedDuringExport
(
self
):
self
.
_setUpFakeInstanceFolder
()
...
...
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