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
Roque
slapos
Commits
ea0e89b8
Commit
ea0e89b8
authored
Jan 19, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia/test: test that monitoring URL all have same password
parent
f365a440
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
software/theia/test/test.py
software/theia/test/test.py
+29
-3
No files found.
software/theia/test/test.py
View file @
ea0e89b8
...
...
@@ -40,9 +40,8 @@ import netaddr
import
pexpect
import
psutil
import
requests
import
six
from
six.moves.urllib.parse
import
urlparse
,
urljoin
from
urllib.parse
import
urlparse
,
urljoin
,
parse_qsl
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
,
SlapOSNodeCommandError
from
slapos.grid.svcbackend
import
getSupervisorRPC
,
_getSupervisordSocketPath
...
...
@@ -621,7 +620,34 @@ class ResilientTheiaMixin(object):
class
TestTheiaResilientInterface
(
ResilientTheiaMixin
,
TestTheia
):
pass
def
test_all_monitor_url_use_same_password
(
self
):
monitor_setup_params
=
dict
(
parse_qsl
(
urlparse
(
self
.
computer_partition
.
getConnectionParameterDict
()
[
'monitor-setup-url'
]).
fragment
))
monitor_url_list
=
[
u
for
u
in
[
p
.
getConnectionParameterDict
().
get
(
'monitor-base-url'
)
for
p
in
self
.
slap
.
computer
.
getComputerPartitionList
()
]
if
u
is
not
None
]
self
.
assertEqual
(
len
(
monitor_url_list
),
4
)
for
url
in
monitor_url_list
:
self
.
assertEqual
(
requests
.
get
(
url
,
verify
=
False
).
status_code
,
requests
.
codes
.
unauthorized
)
requests
.
get
(
url
,
verify
=
False
,
auth
=
(
monitor_setup_params
[
'username'
],
monitor_setup_params
[
'password'
],
)).
raise_for_status
()
class
TestTheiaResilientWithEmbeddedInstance
(
ResilientTheiaMixin
,
TestTheiaWithEmbeddedInstance
):
...
...
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