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
450c44a9
Commit
450c44a9
authored
Sep 06, 2024
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia/test: test monitoring parameters propagation
parent
a8de2a0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
software/theia/test/test.py
software/theia/test/test.py
+54
-0
No files found.
software/theia/test/test.py
View file @
450c44a9
...
...
@@ -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,47 @@ class TestTheiaResilientInterface(ResilientTheiaMixin, TestTheia):
class
TestTheiaResilientWithEmbeddedInstance
(
ResilientTheiaMixin
,
TestTheiaWithEmbeddedInstance
):
pass
class
TestTheiaResilientMonitoring
(
ResilientTheiaMixin
,
TheiaTestCase
):
MONITOR_CORS_DOMAINS
=
'monitor.couscous.cors'
MONITOR_INTERFACE_URL
=
'monitor.couscous.interface'
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'monitor-cors-domains'
:
TestTheiaResilientMonitoring
.
MONITOR_CORS_DOMAINS
,
'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
]
self
.
assertEqual
(
len
(
monitor_cors_url_list
),
4
)
for
url
in
monitor_cors_url_list
:
self
.
assertIn
(
TestTheiaResilientMonitoring
.
MONITOR_CORS_DOMAINS
,
url
)
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