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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Steven Gueguen
slapos
Commits
5e8d221c
Commit
5e8d221c
authored
Feb 29, 2024
by
Steven Gueguen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit for tests
parent
6cdfe5f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
software/warp10/test/setup.py
software/warp10/test/setup.py
+21
-0
software/warp10/test/test.py
software/warp10/test/test.py
+23
-0
No files found.
software/warp10/test/setup.py
0 → 100644
View file @
5e8d221c
from
setuptools
import
setup
,
find_packages
setup
(
name
=
'slapos.test.warp10'
,
version
=
'0.0.1'
,
description
=
"Test for SlapOS' Warp 10"
,
long_description
=
"Tests for the Warp 10 platform software release"
,
long_description_content_type
=
'text/markdown'
,
maintainer
=
"SenX"
,
maintainer_email
=
"contact@senx.io"
,
url
=
"https://lab.nexedi.com/nexedi/slapos"
,
packages
=
find_packages
(),
install_requires
=
[
'slapos.core'
,
'slapos.libnetworkcache'
,
'erp5.util'
,
'requests'
,
],
zip_safe
=
True
,
test_suite
=
'test'
,
)
software/warp10/test/test.py
0 → 100644
View file @
5e8d221c
import
requests
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
class
TestWarp10
(
SlapOSInstanceTestCase
):
def
test_web
(
self
):
params
=
self
.
computer_partition
.
getConnectionParameterDict
()
# check that tokens are not empty ( like @tomo suggested - EDIT: I misunderstood, his idea was to check this in a promise )
self
.
assertTrue
(
params
[
'read-token'
])
response
=
requests
.
get
(
params
[
'url'
])
# # maybe tokens are needed here for authentication, then it could be something like that instead:
# response = requests.get(url, headers={'read-token': params['read-token']})
self
.
assertEqual
(
requests
.
codes
[
'OK'
],
response
.
status_code
)
# self.assertIn("*** something expected in the HTML page ***", 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