Skip to content
Snippets Groups Projects
Commit 77207a1f authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

Merge branch 'master' into L2SS-777-add-observations-to-prometheus-exporter

parents d0d7c302 baea5392
No related branches found
No related tags found
1 merge request!387Resolve L2SS-777 "Add observations to prometheus exporter"
...@@ -37,7 +37,17 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase): ...@@ -37,7 +37,17 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
beamlet_proxy.set_defaults() beamlet_proxy.set_defaults()
return beamlet_proxy return beamlet_proxy
def setup_sdp_proxy(self):
# setup SDP, on which this device depends
sdp_proxy = TestDeviceProxy("STAT/SDP/1")
sdp_proxy.off()
sdp_proxy.warm_boot()
sdp_proxy.set_defaults()
return sdp_proxy
def test_pointing_to_zenith(self): def test_pointing_to_zenith(self):
self.setup_sdp_proxy()
self.setup_recv_proxy()
# Setup beamlet configuration # Setup beamlet configuration
self.beamlet_proxy.clock_RW = 200 * 1000000 self.beamlet_proxy.clock_RW = 200 * 1000000
self.beamlet_proxy.subband_select = list(range(488)) self.beamlet_proxy.subband_select = list(range(488))
......
...@@ -68,10 +68,10 @@ class TestStatisticsWriterSST(BaseIntegrationTestCase): ...@@ -68,10 +68,10 @@ class TestStatisticsWriterSST(BaseIntegrationTestCase):
stat = stat_parser.get_statistic('2021-09-20T12:17:40.000+00:00') # same as stat_parser.statistics[0] stat = stat_parser.get_statistic('2021-09-20T12:17:40.000+00:00') # same as stat_parser.statistics[0]
self.assertIsNotNone(stat) self.assertIsNotNone(stat)
self.assertEqual(121, stat.data_id_signal_input_index) self.assertEqual(121, stat.data_id_signal_input_index)
# Test RECV attributes # RECV attributes are not present since the stats-writer is not connecting to any host
self.assertListEqual(stat.rcu_attenuator_dB.tolist(), [0] * 96) self.assertEqual(stat.rcu_attenuator_dB.tolist(), None)
self.assertListEqual(stat.rcu_band_select.tolist(), [0] * 96) self.assertEqual(stat.rcu_band_select.tolist(), None)
self.assertListEqual(stat.rcu_dth_on.tolist(), [False] * 96) self.assertEqual(stat.rcu_dth_on.tolist(), None)
def test_no_tango_SST_statistics(self): def test_no_tango_SST_statistics(self):
......
...@@ -139,11 +139,11 @@ def main(): ...@@ -139,11 +139,11 @@ def main():
logger.debug("Setting loglevel to DEBUG") logger.debug("Setting loglevel to DEBUG")
# sets the Tango connection in order to retrieve attribute values # sets the Tango connection in order to retrieve attribute values
if tango_disabled: if tango_disabled or not host:
logger.warning("Tango connection is DISABLED") logger.warning("Tango connection is DISABLED")
device = None device = None
else: else:
device = DeviceProxy(args.device) if mode=='SST' else None device = DeviceProxy(f"tango://{host}:10000/{args.device}".lower()) if mode=='SST' else None
# creates the TCP receiver that is given to the writer # creates the TCP receiver that is given to the writer
receiver = _create_receiver(filename, host, port) receiver = _create_receiver(filename, host, port)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment