From cf8f69c79f95233f0eab9f1aea64d3655a8a3864 Mon Sep 17 00:00:00 2001 From: lukken <lukken@astron.nl> Date: Wed, 25 Aug 2021 15:14:37 +0000 Subject: [PATCH] L2SS-240: Update references to apcst temporarily --- devices/integration_test/README.md | 4 +--- ...{test_device_apsct.py => test_device_pcc.py} | 17 ++++++----------- .../integration_test/devices/test_device_sdp.py | 4 +--- 3 files changed, 8 insertions(+), 17 deletions(-) rename devices/integration_test/devices/{test_device_apsct.py => test_device_pcc.py} (69%) diff --git a/devices/integration_test/README.md b/devices/integration_test/README.md index 55c42d3df..3292bfa00 100644 --- a/devices/integration_test/README.md +++ b/devices/integration_test/README.md @@ -7,15 +7,13 @@ container will be build by the makefiles but should only be started by the dedicated integration test script. This script will ensure that other containers are running and are in the required state. -[comment]: <> (#TODO(Corne): Change pypcc-sim name to apsct-sim name once changed!) - * Launch pypcc-sim and sdptr-sim simulators. * Reconfigure dsconfig to use these simulators. * Create and start the integration-test container. ## Running -**Warning running these tests will make changes to your local system!** +**Warning running these tests will make changes to your CDB database config!** ```shell source bootstrap/etc/lofar20rc.sh diff --git a/devices/integration_test/devices/test_device_apsct.py b/devices/integration_test/devices/test_device_pcc.py similarity index 69% rename from devices/integration_test/devices/test_device_apsct.py rename to devices/integration_test/devices/test_device_pcc.py index 8d2d384b7..b3b7a4672 100644 --- a/devices/integration_test/devices/test_device_apsct.py +++ b/devices/integration_test/devices/test_device_pcc.py @@ -15,10 +15,10 @@ from tango._tango import DevState from integration_test import base -class TestDeviceAPSCT(base.IntegrationTestCase): +class TestDevicePCC(base.IntegrationTestCase): def setUp(self): - super(TestDeviceAPSCT, self).setUp() + super(TestDevicePCC, self).setUp() def tearDown(self): """Turn device Off in teardown to prevent blocking tests""" @@ -28,35 +28,30 @@ class TestDeviceAPSCT(base.IntegrationTestCase): d.Off() except Exception as e: """Failing to turn Off devices should not raise errors here""" - print("Failed to turn device off in teardown %s" % e) + print(f"Failed to turn device off in teardown {e}") - def test_device_proxy_apsct(self): + def test_device_proxy_pcc(self): """Test if we can successfully create a DeviceProxy and fetch state""" - #TODO(Corne): Change name to APSCT once ready d = DeviceProxy("LTS/PCC/1") self.assertEqual(DevState.OFF, d.state()) - def test_device_apsct_initialize(self): + def test_device_pcc_initialize(self): """Test if we can transition to standby""" - # TODO(Corne): Change name to APSCT once ready d = DeviceProxy("LTS/PCC/1") d.initialise() - time.sleep(1) self.assertEqual(DevState.STANDBY, d.state()) - def test_device_apsct_on(self): + def test_device_pcc_on(self): """Test if we can transition to on""" - # TODO(Corne): Change name to APSCT once ready d = DeviceProxy("LTS/PCC/1") d.initialise() - time.sleep(1) d.on() diff --git a/devices/integration_test/devices/test_device_sdp.py b/devices/integration_test/devices/test_device_sdp.py index 040df6c10..cfd656748 100644 --- a/devices/integration_test/devices/test_device_sdp.py +++ b/devices/integration_test/devices/test_device_sdp.py @@ -29,7 +29,7 @@ class TestDeviceSDP(base.IntegrationTestCase): d.Off() except Exception as e: """Failing to turn Off devices should not raise errors here""" - print("Failed to turn device off in teardown %s" % e) + print(f"Failed to turn device off in teardown {e}") def test_device_proxy_sdp(self): """Test if we can successfully create a DeviceProxy and fetch state""" @@ -44,7 +44,6 @@ class TestDeviceSDP(base.IntegrationTestCase): d = DeviceProxy("LTS/SDP/1") d.initialise() - time.sleep(1) self.assertEqual(DevState.STANDBY, d.state()) @@ -54,7 +53,6 @@ class TestDeviceSDP(base.IntegrationTestCase): d = DeviceProxy("LTS/SDP/1") d.initialise() - time.sleep(1) d.on() -- GitLab