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
Léo-Paul Géneau
slapos
Commits
f1652fee
Commit
f1652fee
authored
Jan 19, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/seleniumserver/test: verify that authentication is required
this was just not tested
parent
c7d4c9bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
software/seleniumserver/test/test.py
software/seleniumserver/test/test.py
+12
-0
No files found.
software/seleniumserver/test/test.py
View file @
f1652fee
...
...
@@ -310,6 +310,12 @@ class TestFrontend(WebServerMixin, SeleniumServerTestCase):
parsed
=
urllib
.
parse
.
urlparse
(
admin_url
)
self
.
assertEqual
(
'admin'
,
parsed
.
username
)
self
.
assertTrue
(
parsed
.
password
)
self
.
assertEqual
(
requests
.
get
(
parsed
.
_replace
(
netloc
=
f"[
{
parsed
.
hostname
}
]:
{
parsed
.
port
}
"
).
geturl
(),
verify
=
False
).
status_code
,
requests
.
codes
.
unauthorized
)
self
.
assertIn
(
'Grid Console'
,
requests
.
get
(
admin_url
,
verify
=
False
).
text
)
...
...
@@ -319,6 +325,12 @@ class TestFrontend(WebServerMixin, SeleniumServerTestCase):
parsed
=
urllib
.
parse
.
urlparse
(
webdriver_url
)
self
.
assertEqual
(
'selenium'
,
parsed
.
username
)
self
.
assertTrue
(
parsed
.
password
)
self
.
assertEqual
(
requests
.
get
(
parsed
.
_replace
(
netloc
=
f"[
{
parsed
.
hostname
}
]:
{
parsed
.
port
}
"
).
geturl
(),
verify
=
False
).
status_code
,
requests
.
codes
.
unauthorized
)
# XXX we are using a self signed certificate, but selenium 3.141.0 does
# not expose API to ignore certificate verification
...
...
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