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
bcc243ad
Commit
bcc243ad
authored
Sep 06, 2024
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia/test: test monitoring parameters propagation
parent
fa88a97d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
software/theia/test/test.py
software/theia/test/test.py
+52
-0
No files found.
software/theia/test/test.py
View file @
bcc243ad
...
...
@@ -626,6 +626,16 @@ class ResilientTheiaMixin(object):
class
TestTheiaResilientInterface
(
ResilientTheiaMixin
,
TestTheia
):
def
test_monitoring_default_interface
(
self
):
monitor_setup_url_list
=
[
u
for
u
in
[
p
.
getConnectionParameterDict
().
get
(
'monitor-setup-url'
)
for
p
in
self
.
slap
.
computer
.
getComputerPartitionList
()
]
if
u
is
not
None
]
for
url
in
monitor_setup_url_list
:
self
.
assertIn
(
'monitor.app.officejs.com'
,
url
)
def
test_all_monitor_url_use_same_password
(
self
):
monitor_setup_params
=
dict
(
parse_qsl
(
...
...
@@ -666,3 +676,45 @@ class TestTheiaResilientInterface(ResilientTheiaMixin, TestTheia):
class
TestTheiaResilientWithEmbeddedInstance
(
ResilientTheiaMixin
,
TestTheiaWithEmbeddedInstance
):
pass
class
TestTheiaResilientMonitoring
(
ResilientTheiaMixin
,
TheiaTestCase
):
MONITOR_CORS_DOMAIN
=
'monitor.couscous.interface'
MONITOR_INTERFACE_URL
=
'https://'
+
MONITOR_CORS_DOMAIN
+
'/#param1=a1'
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'monitor-interface-url'
:
TestTheiaResilientMonitoring
.
MONITOR_INTERFACE_URL
}
def
test_monitoring_propagation
(
self
):
monitor_setup_url_list
=
[
u
for
u
in
[
p
.
getConnectionParameterDict
().
get
(
'monitor-setup-url'
)
for
p
in
self
.
slap
.
computer
.
getComputerPartitionList
()
]
if
u
is
not
None
]
self
.
assertEqual
(
len
(
monitor_setup_url_list
),
4
)
for
url
in
monitor_setup_url_list
:
self
.
assertIn
(
TestTheiaResilientMonitoring
.
MONITOR_INTERFACE_URL
,
url
)
monitor_cors_url_list
=
[
u
for
u
in
[
p
.
getInstanceParameterDict
().
get
(
'monitor-cors-domains'
)
for
p
in
self
.
slap
.
computer
.
getComputerPartitionList
()
]
if
u
is
not
None
]
for
url
in
monitor_cors_url_list
:
self
.
assertIn
(
TestTheiaResilientMonitoring
.
MONITOR_CORS_DOMAIN
,
url
)
# TODO: assert equal
monitor_interface_url_list
=
[
u
for
u
in
[
p
.
getInstanceParameterDict
().
get
(
'monitor-interface-url'
)
for
p
in
self
.
slap
.
computer
.
getComputerPartitionList
()
]
if
u
is
not
None
]
self
.
assertEqual
(
len
(
monitor_interface_url_list
),
4
)
for
url
in
monitor_interface_url_list
:
self
.
assertIn
(
TestTheiaResilientMonitoring
.
MONITOR_INTERFACE_URL
,
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