From 2b779db8589fb53c3780dc72d7fc1818406dfdf1 Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Fri, 6 May 2022 11:30:59 +0200 Subject: [PATCH] L2SS-781: add basic integration-test --- .../integration_test/default/toolkit/test_archiver.py | 11 +++++++++++ .../toolkit/archiver_configurator.py | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/toolkit/test_archiver.py b/tangostationcontrol/tangostationcontrol/integration_test/default/toolkit/test_archiver.py index c63a78363..2c9960685 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/toolkit/test_archiver.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/toolkit/test_archiver.py @@ -11,6 +11,7 @@ from tangostationcontrol.integration_test.base import BaseIntegrationTestCase from tangostationcontrol.toolkit.archiver import Archiver from tangostationcontrol.toolkit.retriever import RetrieverTimescale from tangostationcontrol.toolkit.archiver_util import attribute_fqdn +from tangostationcontrol.toolkit.archiver_configurator import get_multimember_devices from tangostationcontrol.integration_test.device_proxy import TestDeviceProxy import time @@ -214,3 +215,13 @@ class TestArchiver(BaseIntegrationTestCase): records = self.retriever.get_lofar_attribute(attr_fullname) wait+=1 return records + + def test_get_multimember_devices(self): + """Test if multimember devices are correctly identified""" + config_dict = self.archiver.get_configuration() + self.assertIsNotNone(config_dict) + env_dict = config_dict['devices'] + matched_devices_dict = get_multimember_devices(env_dict) + self.assertIsNotNone(matched_devices_dict) + # TODO add assertions when multi-member devices will be added to TangoDB + diff --git a/tangostationcontrol/tangostationcontrol/toolkit/archiver_configurator.py b/tangostationcontrol/tangostationcontrol/toolkit/archiver_configurator.py index c38c69dc0..fb736057f 100644 --- a/tangostationcontrol/tangostationcontrol/toolkit/archiver_configurator.py +++ b/tangostationcontrol/tangostationcontrol/toolkit/archiver_configurator.py @@ -89,7 +89,6 @@ def get_multimember_devices(env_dict:dict): # Get a Tango DB reference tangodb = Database() # Scan configuration dictionary for possible multi-member devices - #matched_devices = [] matched_devices_dict = {} for device in env_dict: # Search for asterisk in device names -- GitLab