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
fa972a7d
Commit
fa972a7d
authored
Oct 31, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: Test and configuration improvement
parent
60421bad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
9 deletions
+35
-9
software/peertube/template-peertube.yaml.in
software/peertube/template-peertube.yaml.in
+9
-9
software/peertube/test/test.py
software/peertube/test/test.py
+26
-0
No files found.
software/peertube/template-peertube.yaml.in
View file @
fa972a7d
...
...
@@ -393,14 +393,14 @@ transcoding:
resolutions: # Only created if the original video has a higher resolution, uses more storage!
0p: false # audio-only (creates mp4 without video stream, always created when enabled)
144p:
fals
e
240p:
fals
e
360p:
fals
e
480p:
fals
e
720p:
fals
e
1080p:
fals
e
1440p:
fals
e
2160p:
fals
e
144p:
tru
e
240p:
tru
e
360p:
tru
e
480p:
tru
e
720p:
tru
e
1080p:
tru
e
1440p:
tru
e
2160p:
tru
e
# Transcode and keep original resolution, even if it's above your maximum enabled resolution
always_transcode_original_resolution: true
...
...
@@ -688,7 +688,7 @@ search:
# If enabled, the associated group will be able to "escape" from the instance follows
# That means they will be able to follow channels, watch videos, list videos of non followed instances
remote_uri:
users:
tru
e
users:
fals
e
anonymous: false
# Use a third party index instead of your local index, only for search results
...
...
software/peertube/test/test.py
View file @
fa972a7d
...
...
@@ -27,6 +27,7 @@
import
os
import
requests
import
re
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
...
@@ -35,6 +36,26 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
ipv6_regexp
=
'''(?:(?x)(?:(?:[0-9a-f]{1,4}:){1,1}(?::[0-9a-f]{1,4}){1,6})|
(?:(?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,5})|
(?:(?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,4})|
(?:(?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,3})|
(?:(?:[0-9a-f]{1,4}:){1,5}(?::[0-9a-f]{1,4}){1,2})|
(?:(?:[0-9a-f]{1,4}:){1,6}(?::[0-9a-f]{1,4}){1,1})|
(?:(?:(?:[0-9a-f]{1,4}:){1,7}|:):)|
(?::(?::[0-9a-f]{1,4}){1,7})|
(?:(?:(?:(?:[0-9a-f]{1,4}:){6})(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3}))|
(?:(?:(?:[0-9a-f]{1,4}:){5}[0-9a-f]{1,4}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3}))|
(?:(?:[0-9a-f]{1,4}:){5}:[0-9a-f]{1,4}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3})|
(?:(?:[0-9a-f]{1,4}:){1,1}(?::[0-9a-f]{1,4}){1,4}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3})|
(?:(?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,3}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3})|
(?:(?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,2}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3})|
(?:(?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,1}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3})|
(?:(?:(?:[0-9a-f]{1,4}:){1,5}|:):(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3})|
(?::(?::[0-9a-f]{1,4}){1,5}:(?:25[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)(?:
\
.(?:
25
[0-5]|2[0-4]
\
d|[
0
-1]?
\
d?
\
d)){3}))
'''
class
TestPeerTube
(
SlapOSInstanceTestCase
):
def
setUp
(
self
):
self
.
connection_parameters
=
self
.
computer_partition
.
getConnectionParameterDict
()
...
...
@@ -46,3 +67,8 @@ class TestPeerTube(SlapOSInstanceTestCase):
response
=
requests
.
get
(
url
,
verify
=
False
)
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
self
.
assertIn
(
'PeerTube'
,
response
.
text
)
response
=
requests
.
get
(
url
+
"/feeds/videos.xml?sort=-trending"
,
verify
=
False
)
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
self
.
assertIn
(
'rss'
,
response
.
text
)
self
.
assertFalse
(
bool
(
re
.
search
(
ipv6_regexp
,
response
.
text
)))
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