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
Boxiang Sun
slapos
Commits
5f0c6c2e
Commit
5f0c6c2e
authored
2 years ago
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
theia: peertube test improvement
parent
0366682a
Pipeline
#25004
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
+33
-2
software/theia/test/project_tests.py
software/theia/test/project_tests.py
+33
-2
No files found.
software/theia/test/project_tests.py
View file @
5f0c6c2e
...
...
@@ -276,8 +276,8 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
client_id
=
data
[
'client_id'
]
client_secret
=
data
[
'client_secret'
]
username
=
self
.
connection_parameters
[
'username'
]
password
=
self
.
connection_parameters
[
'password'
]
username
=
self
.
peertube_conenction_info
[
'username'
]
password
=
self
.
peertube_conenction_info
[
'password'
]
auth_data
=
{
'client_id'
:
client_id
,
'client_secret'
:
client_secret
,
...
...
@@ -369,6 +369,37 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
for
_
in
range
(
2
):
self
.
_processEmbeddedInstance
(
self
.
test_instance_max_retries
)
peertube_conenction_info
=
self
.
_getPeertubeConnexionParameters
()
frontend_url
=
peertube_conenction_info
[
'frontend-url'
]
postgresql_srv
=
os
.
path
.
join
(
postgresql_partition
,
'var'
,
'www'
,
'peertube'
,
'storage'
)
# Get the video path, the part of this path will be used in the video URL
# e.g: var/www/peertube/storage/streaming-playlists/hls/XXXX/YYYY.mp4
# path before hls dir
hls_path
=
os
.
path
.
join
(
storage_path
,
'streaming-playlists'
,
'hls'
)
#Choose only one video path
video_path
=
None
for
root
,
dirs
,
files
in
os
.
walk
(
hls_path
):
for
a_file
in
files
:
if
a_file
.
endswith
(
'.mp4'
):
video_path
=
os
.
path
.
join
(
root
,
a_file
)
break
else
:
continue
break
# path like "streaming-playlists/hls/XXXX/YYYY.mp4"
self
.
assertIn
(
'streaming-playlists'
,
video_path
)
streaming
-
playlists_path
=
video_path
[
video_path
.
index
(
'streaming-playlists'
):]
video_url
=
frontend_url
+
'static/'
+
streaming_video_list
response
=
requests
.
get
(
video_url
,
verify
=
False
)
# The video mp4 file is accesible through the URL
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
# Check that the postgresql catalog was properly restored
output
=
subprocess
.
check_output
(
(
postgresql_bin
,
'-h'
,
postgresql_srv
,
'-U'
,
'peertube'
,
'-d'
,
'peertube_prod'
,
...
...
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