Commit 450c44a9 authored by Roque's avatar Roque

software/theia/test: test monitoring parameters propagation

parent a8de2a0c
...@@ -626,6 +626,16 @@ class ResilientTheiaMixin(object): ...@@ -626,6 +626,16 @@ class ResilientTheiaMixin(object):
class TestTheiaResilientInterface(ResilientTheiaMixin, TestTheia): 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): def test_all_monitor_url_use_same_password(self):
monitor_setup_params = dict( monitor_setup_params = dict(
parse_qsl( parse_qsl(
...@@ -666,3 +676,47 @@ class TestTheiaResilientInterface(ResilientTheiaMixin, TestTheia): ...@@ -666,3 +676,47 @@ class TestTheiaResilientInterface(ResilientTheiaMixin, TestTheia):
class TestTheiaResilientWithEmbeddedInstance(ResilientTheiaMixin, TestTheiaWithEmbeddedInstance): class TestTheiaResilientWithEmbeddedInstance(ResilientTheiaMixin, TestTheiaWithEmbeddedInstance):
pass 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment