Skip to content
Snippets Groups Projects
Commit fed65f75 authored by Hannes Feldt's avatar Hannes Feldt
Browse files

Merge branch 'fix-integration-tests' into 'master'

Fix integration tests

See merge request !1063
parents 2a6cc8ba e4cbf1ef
Branches
Tags
1 merge request!1063Fix integration tests
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
""" """
Power Hierarchy module integration test Power Hierarchy module integration test
""" """
import logging import logging
from tango import DevState, DeviceProxy from tango import DevState, DeviceProxy
......
...@@ -11,7 +11,6 @@ from tangostationcontrol.common.configuration import StationConfiguration ...@@ -11,7 +11,6 @@ from tangostationcontrol.common.configuration import StationConfiguration
class TestStationConfiguration(BaseIntegrationTestCase): class TestStationConfiguration(BaseIntegrationTestCase):
TEST_CONFIGURATION = """{ TEST_CONFIGURATION = """{
"servers": { "servers": {
"AFH": { "AFH": {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
""" """
Power Hierarchy module integration test Power Hierarchy module integration test
""" """
import logging import logging
import tangostationcontrol import tangostationcontrol
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
""" """
Power Hierarchy module integration test Power Hierarchy module integration test
""" """
import logging import logging
from tango import Database from tango import Database
......
# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) # Copyright (C) 2025 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import json import json
...@@ -153,6 +153,28 @@ class TestDeviceObservationField(TestDeviceBase): ...@@ -153,6 +153,28 @@ class TestDeviceObservationField(TestDeviceBase):
} }
) )
def test_device_boot(self):
"""Test if we can transition off -> on using a warm boot"""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_boot()
def test_device_initialize(self):
"""Test if we can transition to standby"""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_initialize()
def test_device_on(self):
"""Test if we can transition off -> standby -> on"""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_on()
def test_device_read_all_attributes(self):
"""Test if we can read all of the exposed attributes in the ON state.
This test covers the reading logic of all attributes."""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_read_all_attributes()
def test_init_valid(self): def test_init_valid(self):
"""Initialize an observation with valid JSON""" """Initialize an observation with valid JSON"""
...@@ -251,9 +273,9 @@ class TestDeviceObservationField(TestDeviceBase): ...@@ -251,9 +273,9 @@ class TestDeviceObservationField(TestDeviceBase):
self.proxy.observation_field_settings_RW = self.VALID_JSON self.proxy.observation_field_settings_RW = self.VALID_JSON
self.proxy.Initialise() self.proxy.Initialise()
self.proxy.On() self.proxy.On()
expected_bands = [ expected_bands = (
[2, 2] [[2, 2]] * CS001_TILES
] * CS001_TILES # we request every antenna to be in this band, regardless of mask ) # we request every antenna to be in this band, regardless of mask
self.assertListEqual( self.assertListEqual(
antennafield_proxy.RCU_band_select_RW.tolist(), expected_bands antennafield_proxy.RCU_band_select_RW.tolist(), expected_bands
) )
......
...@@ -86,7 +86,6 @@ class TestDeviceProtectionControl(TestDeviceBase): ...@@ -86,7 +86,6 @@ class TestDeviceProtectionControl(TestDeviceBase):
@pytest.mark.timeout(10) @pytest.mark.timeout(10)
def test_change_events_received(self): def test_change_events_received(self):
self.proxy.boot() self.proxy.boot()
self.assertEqual(self.proxy.state(), DevState.ON) self.assertEqual(self.proxy.state(), DevState.ON)
......
...@@ -137,8 +137,8 @@ class TestDigitalbeamPerformance(base.IntegrationTestCase): ...@@ -137,8 +137,8 @@ class TestDigitalbeamPerformance(base.IntegrationTestCase):
self.assertEqual(0, beam.Nr_update_pointing_exceptions_R) self.assertEqual(0, beam.Nr_update_pointing_exceptions_R)
logging.error( logging.error(
f"Median {statistics.median(results) / 1.e9} Stdev " f"Median {statistics.median(results) / 1.0e9} Stdev "
f"{statistics.stdev(results) / 1.e9}" f"{statistics.stdev(results) / 1.0e9}"
) )
def test_digitalbeam_multi_tracking_performance(self): def test_digitalbeam_multi_tracking_performance(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment