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
e8647408
Commit
e8647408
authored
Dec 07, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: test debug
parent
8e11d9ba
Pipeline
#25220
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
software/theia/test/project_tests.py
software/theia/test/project_tests.py
+18
-10
No files found.
software/theia/test/project_tests.py
View file @
e8647408
...
...
@@ -381,6 +381,20 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
frontend_url
=
peertube_conenction_info
[
'frontend-url'
]
storage_path
=
os
.
path
.
join
(
postgresql_partition
,
'var'
,
'www'
,
'peertube'
,
'storage'
)
# Wait for connect Peertube
for
_
in
range
(
5
):
try
:
response
=
requests
.
get
(
frontend_url
,
verify
=
False
,
allow_redirects
=
False
)
except
Exception
:
time
.
sleep
(
20
)
continue
if
response
.
status_code
!=
200
:
time
.
sleep
(
20
)
continue
break
else
:
self
.
fail
(
'Failed to connect to Peertube'
)
# 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
...
...
@@ -400,15 +414,14 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
# path like "streaming-playlists/hls/XXXX/YYYY.mp4"
self
.
assertIn
(
'streaming-playlists'
,
video_path
)
streaming_video_path
=
video_path
[
video_path
.
index
(
'streaming-playlists'
):]
response
=
requests
.
get
(
frontend_url
,
verify
=
False
)
# The frontend url is accesible
streaming_video_path
=
video_path
[
video_path
.
index
(
'streaming-playlists'
):]
video_url
=
frontend_url
+
'/static/'
+
streaming_video_path
response
=
requests
.
get
(
video_url
,
verify
=
False
)
# The video mp4 file is accesible through the URL
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
video_feeds_url
=
frontend_url
+
'/feeds/video.json'
response
=
requests
.
get
(
video_feeds_url
,
verify
=
False
)
# The video feeds returns the correct status code
...
...
@@ -422,11 +435,6 @@ class TestTheiaResiliencePeertube(test_resiliency.TestTheiaResilience):
video_title
=
video_data
[
'items'
][
0
][
'title'
]
self
.
assertIn
(
"Small test video"
in
video_title
)
video_url
=
frontend_url
+
'/static/'
+
streaming_video_path
response
=
requests
.
get
(
video_url
,
verify
=
False
)
# The video mp4 file is accesible through the URL
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
def
_getPeertubePartition
(
self
,
servicename
):
p
=
subprocess
.
Popen
(
(
self
.
_getSlapos
(),
'node'
,
'status'
),
...
...
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