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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
1f497600
Commit
1f497600
authored
Nov 02, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup
parent
134db22b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
slapos/resilient/runner_exporter.py
slapos/resilient/runner_exporter.py
+10
-7
slapos/test/test_runner_exporter.py
slapos/test/test_runner_exporter.py
+2
-5
No files found.
slapos/resilient/runner_exporter.py
View file @
1f497600
...
...
@@ -154,20 +154,23 @@ def synchroniseRunnerConfigurationDirectory(config, backup_path):
def
synchroniseRunnerWorkingDirectory
(
config
,
backup_path
):
file_list
=
[]
exclude_list
=
[]
if
os
.
path
.
isdir
(
'instance'
):
file_list
.
append
(
'instance'
)
exclude_list
=
getExcludePathList
(
'.'
)
rsync
(
config
.
rsync_binary
,
'instance'
,
backup_path
,
[
"--exclude={}"
.
format
(
x
)
for
x
in
exclude_list
],
dry
=
config
.
dry
,
)
file_list
=
[]
for
file
in
(
'project'
,
'public'
,
'proxy.db'
):
if
os
.
path
.
exists
(
file
):
file_list
.
append
(
file
)
if
file_list
:
rsync
(
config
.
rsync_binary
,
file_list
,
backup_path
,
dry
=
config
.
dry
)
rsync
(
config
.
rsync_binary
,
file_list
,
backup_path
,
[
"--exclude={}"
.
format
(
x
)
for
x
in
exclude_list
],
dry
=
config
.
dry
)
def
getSlappartSignatureMethodDict
():
...
...
slapos/test/test_runner_exporter.py
View file @
1f497600
...
...
@@ -153,12 +153,9 @@ class TestRunnerExporter(unittest.TestCase):
config
,
'backup/runner/runner'
)
self
.
assertEqual
(
check_call_mock
.
call_count
,
2
)
check_call_mock
.
assert_any_call
(
[
'rsync'
,
'-rlptgov'
,
'--stats'
,
'--safe-links'
,
'--ignore-missing-args'
,
'--delete'
,
'--delete-excluded'
,
'--exclude=*.sock'
,
'--exclude=*.socket'
,
'--exclude=*.pid'
,
'--exclude=.installed*.cfg'
,
'--exclude=srv/backup/**'
,
'--exclude=instance/slappart0/etc/nicolas.txt'
,
'--exclude=instance/slappart0/etc/rafael.txt'
,
'--exclude=srv/exporter.exclude'
,
'instance'
,
'backup/runner/runner'
]
)
self
.
assertEqual
(
check_call_mock
.
call_count
,
1
)
check_call_mock
.
assert_any_call
(
[
'rsync'
,
'-rlptgov'
,
'--stats'
,
'--safe-links'
,
'--ignore-missing-args'
,
'--delete'
,
'--delete-excluded'
,
'project'
,
'public'
,
'proxy.db'
,
'backup/runner/runner'
]
[
'rsync'
,
'-rlptgov'
,
'--stats'
,
'--safe-links'
,
'--ignore-missing-args'
,
'--delete'
,
'--delete-excluded'
,
'
--exclude=*.sock'
,
'--exclude=*.socket'
,
'--exclude=*.pid'
,
'--exclude=.installed*.cfg'
,
'--exclude=srv/backup/**'
,
'--exclude=instance/slappart0/etc/nicolas.txt'
,
'--exclude=instance/slappart0/etc/rafael.txt'
,
'--exclude=srv/exporter.exclude'
,
'instance'
,
'
project'
,
'public'
,
'proxy.db'
,
'backup/runner/runner'
]
)
def
test_getSlappartSignatureMethodDict
(
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