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
Lukas Niegsch
slapos
Commits
d57fe73f
Commit
d57fe73f
authored
Jun 06, 2022
by
Lukas Niegsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a test case that check if the url is valid
parent
0a5772f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
software/headless-chromium/test/test.py
software/headless-chromium/test/test.py
+25
-0
No files found.
software/headless-chromium/test/test.py
View file @
d57fe73f
...
...
@@ -68,3 +68,28 @@ class TestHeadlessChromium(SlapOSInstanceTestCase):
response
=
requests
.
get
(
proxyURL
+
frontend
,
verify
=
False
,
auth
=
(
username
,
password
))
self
.
assertEqual
(
requests
.
codes
[
'ok'
],
response
.
status_code
)
class
TestHeadlessChromiumParameters
(
SlapOSInstanceTestCase
):
instance_parameter_dict
=
{
# this website echoes the get request for debugging purposes
'target-url'
:
'https://httpbin.org/get?a=6&b=4'
,
# avoid conflicts with ports that are used in other test cases
'remote-debugging-port'
:
8084
,
'nginx-proxy-port'
:
8085
,
'monitor-httpd-port'
:
8086
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
cls
.
instance_parameter_dict
def
setUp
(
self
):
self
.
connection_parameters
=
self
.
requestDefaultInstance
().
getConnectionParameterDict
()
def
test_chromium_loads_target_url_parameter
(
self
):
url
=
self
.
connection_parameters
[
'remote-debug-url'
]
response
=
requests
.
get
(
'%s/json'
%
url
)
loaded_url
=
response
.
json
()[
0
][
'url'
]
self
.
assertEqual
(
loaded_url
,
self
.
instance_parameter_dict
[
'target-url'
])
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