Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos
Commits
7b0862e1
Commit
7b0862e1
authored
Nov 10, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
theia: peertube backup test update
parent
4c332c49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
software/theia/test/project_tests.py
software/theia/test/project_tests.py
+14
-12
No files found.
software/theia/test/project_tests.py
View file @
7b0862e1
...
@@ -278,25 +278,27 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
...
@@ -278,25 +278,27 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
universal_newlines
=
True
)
universal_newlines
=
True
)
self
.
assertIn
(
"bbb"
,
output
)
self
.
assertIn
(
"bbb"
,
output
)
# Do a fake periodically update
???
# Do a fake periodically update
# Compute backup date in the near future
# Compute backup date in the near future
# date = (datetime.now() + timedelta(days=1)).replace(second=0)
soon
=
(
datetime
.
now
()
+
timedelta
(
minutes
=
4
)).
replace
(
second
=
0
)
frequency
=
'%d * * * *'
%
soon
.
minute
params
=
'_={"peertube-backup-cron": {"frequency": "%s"}, }'
%
frequency
#
Process twice to propagate parameter change
s
#
Update Peertube parameter
s
# for _ in range(2):
print
(
'Requesting Peertube with parameters %s'
%
params
)
# self.checkSlapos('node', 'instance'
)
self
.
checkSlapos
(
'request'
,
'test_instance'
,
self
.
_test_software_url
,
'--parameters'
,
params
)
# Do a fake periodically update???
# Process twice to propagate parameter changes
# ---------------------------
for
_
in
range
(
2
):
self
.
checkSlapos
(
'node'
,
'instance'
)
#
self.callSlapos('node', 'restart', 'all')
self
.
callSlapos
(
'node'
,
'restart'
,
'all'
)
# Wait until after the programmed backup date, and a bit more
# Wait until after the programmed backup date, and a bit more
# t = (soon - datetime.now()).total_seconds()
t
=
(
soon
-
datetime
.
now
()).
total_seconds
()
# self.assertLess(0, t)
self
.
assertLess
(
0
,
t
)
# time.sleep(t + 120)
time
.
sleep
(
t
+
120
)
# -------------------------------------
# Check that postgresql backup has started
# Check that postgresql backup has started
# which contains this file: ./peertube_prod-dump.db
# which contains this file: ./peertube_prod-dump.db
...
...
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