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
c3a9002a
Commit
c3a9002a
authored
Oct 25, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: add test
parent
47275893
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
20 deletions
+27
-20
software/peertube/buildout.hash.cfg
software/peertube/buildout.hash.cfg
+2
-2
software/peertube/instance.cfg.in
software/peertube/instance.cfg.in
+15
-5
software/peertube/software.cfg
software/peertube/software.cfg
+1
-1
software/peertube/template-peertube.yaml.in
software/peertube/template-peertube.yaml.in
+1
-1
software/peertube/test/test.py
software/peertube/test/test.py
+8
-11
No files found.
software/peertube/buildout.hash.cfg
View file @
c3a9002a
...
@@ -24,8 +24,8 @@ md5sum = 458870b70c33a1621b68961ae2372ad5
...
@@ -24,8 +24,8 @@ md5sum = 458870b70c33a1621b68961ae2372ad5
filename = template-peertube-service.sh.in
filename = template-peertube-service.sh.in
# md5sum = 458870b70c33a1621b68961ae2372ad5
# md5sum = 458870b70c33a1621b68961ae2372ad5
[template-peertube
-production
]
[template-peertube]
filename = template-peertube
-production
.yaml.in
filename = template-peertube.yaml.in
# md5sum = 458870b70c33a1621b68961ae2372ad5
# md5sum = 458870b70c33a1621b68961ae2372ad5
[template-nginx-configuration]
[template-nginx-configuration]
...
...
software/peertube/instance.cfg.in
View file @
c3a9002a
...
@@ -8,8 +8,9 @@ parts =
...
@@ -8,8 +8,9 @@ parts =
postgresql
postgresql
nginx-service
nginx-service
nginx-listen-promise
nginx-listen-promise
peertube-
production-
yaml
peertube-yaml
peertube-service
peertube-service
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -33,9 +34,9 @@ storage = $${:peertube_directory}/storage
...
@@ -33,9 +34,9 @@ storage = $${:peertube_directory}/storage
versions = $${:peertube_directory}/versions
versions = $${:peertube_directory}/versions
ssl = $${:etc}/ssl
ssl = $${:etc}/ssl
[peertube-
production-
yaml]
[peertube-yaml]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${template-peertube
-production
:output}
url = ${template-peertube:output}
output = $${directory:config}/peertube.yaml
output = $${directory:config}/peertube.yaml
[peertube-service]
[peertube-service]
...
@@ -103,7 +104,6 @@ recipe = slapos.cookbook:mkdirectory
...
@@ -103,7 +104,6 @@ recipe = slapos.cookbook:mkdirectory
srv = $${directory:srv}/redis
srv = $${directory:srv}/redis
log = $${directory:log}/redis
log = $${directory:log}/redis
[service-redis]
[service-redis]
recipe = slapos.cookbook:redis.server
recipe = slapos.cookbook:redis.server
wrapper = $${directory:services}/redis
wrapper = $${directory:services}/redis
...
@@ -148,6 +148,16 @@ key = $${slap-connection:key-file}
...
@@ -148,6 +148,16 @@ key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
cert = $${slap-connection:cert-file}
configuration._ = {}
configuration._ = {}
[frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = PeerTube Server Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config-url = $${nginx-listen-promise:config-url}
return = domain secure_access
[publish-connection-parameter]
[publish-connection-parameter]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
# url = $${peertube-instance:url
}
frontend-url = $${frontend:connection-domain
}
software/peertube/software.cfg
View file @
c3a9002a
...
@@ -89,7 +89,7 @@ recipe = slapos.recipe.template
...
@@ -89,7 +89,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
output = ${buildout:directory}/${:filename}
[template-peertube
-production
]
[template-peertube]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
output = ${buildout:directory}/${:filename}
...
...
software/peertube/template-peertube
-production
.yaml.in
→
software/peertube/template-peertube.yaml.in
View file @
c3a9002a
...
@@ -5,7 +5,7 @@ listen:
...
@@ -5,7 +5,7 @@ listen:
# Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
# Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
webserver:
webserver:
https: true
https: true
hostname: '
[$${nginx-configuration:ip}]
'
hostname: '
$${frontend:connection-domain}
'
port: $${nginx-configuration:port}
port: $${nginx-configuration:port}
# Secrets you need to generate the first time you run PeerTube
# Secrets you need to generate the first time you run PeerTube
...
...
software/peertube/test/test.py
View file @
c3a9002a
...
@@ -45,17 +45,14 @@ class PeertubeTestCase(SlapOSInstanceTestCase):
...
@@ -45,17 +45,14 @@ class PeertubeTestCase(SlapOSInstanceTestCase):
return
{
"name"
:
cls
.
name
}
return
{
"name"
:
cls
.
name
}
class
HTTPRequestTestMixin
(
object
):
class
TestPeerTube
(
PeertubeTestCase
):
def
setUp
(
self
):
self
.
connection_parameters
=
self
.
computer_partition
.
getConnectionParameterDict
()
"""Test that the service url.${kind} responds Hello ${name}
"""Test that the service url.${kind} responds Hello ${name}
"""
"""
def
test_get
(
self
):
def
test_get
(
self
):
#url = self.computer_partition.getConnectionParameterDict()['url.{}'.format(
backend_url
=
self
.
connection_parameters
[
'frontend-url'
]
# self.kind)]
response
=
requests
.
get
(
url
)
#response = requests.get(url)
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
self
.
assertEqual
(
"Hello"
,
"World"
)
self
.
assertIn
(
'PeerTube'
,
response
.
text
)
class
TestPython
(
PeertubeTestCase
,
HTTPRequestTestMixin
):
name
=
"Python"
kind
=
"python"
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