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
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
filename = template-peertube-service.sh.in
# md5sum = 458870b70c33a1621b68961ae2372ad5
[template-peertube
-production
]
filename = template-peertube
-production
.yaml.in
[template-peertube]
filename = template-peertube.yaml.in
# md5sum = 458870b70c33a1621b68961ae2372ad5
[template-nginx-configuration]
...
...
software/peertube/instance.cfg.in
View file @
c3a9002a
...
...
@@ -8,8 +8,9 @@ parts =
postgresql
nginx-service
nginx-listen-promise
peertube-
production-
yaml
peertube-yaml
peertube-service
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
...
@@ -33,9 +34,9 @@ storage = $${:peertube_directory}/storage
versions = $${:peertube_directory}/versions
ssl = $${:etc}/ssl
[peertube-
production-
yaml]
[peertube-yaml]
recipe = slapos.recipe.template
url = ${template-peertube
-production
:output}
url = ${template-peertube:output}
output = $${directory:config}/peertube.yaml
[peertube-service]
...
...
@@ -103,7 +104,6 @@ recipe = slapos.cookbook:mkdirectory
srv = $${directory:srv}/redis
log = $${directory:log}/redis
[service-redis]
recipe = slapos.cookbook:redis.server
wrapper = $${directory:services}/redis
...
...
@@ -148,6 +148,16 @@ key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
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]
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
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
[template-peertube
-production
]
[template-peertube]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${: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:
# Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
webserver:
https: true
hostname: '
[$${nginx-configuration:ip}]
'
hostname: '
$${frontend:connection-domain}
'
port: $${nginx-configuration:port}
# 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):
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}
"""
def
test_get
(
self
):
#url = self.computer_partition.getConnectionParameterDict()['url.{}'.format(
# self.kind)]
#response = requests.get(url)
self
.
assertEqual
(
"Hello"
,
"World"
)
class
TestPython
(
PeertubeTestCase
,
HTTPRequestTestMixin
):
name
=
"Python"
kind
=
"python"
backend_url
=
self
.
connection_parameters
[
'frontend-url'
]
response
=
requests
.
get
(
url
)
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
self
.
assertIn
(
'PeerTube'
,
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