diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index 7375bce8acb469bf3cabb13def038dfef268c56d..f795e982dde815b793062803d97f6028ec106eee 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -17,9 +17,10 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1 make build device-sdp device-recv device-sst device-unb2 device-xst make build sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim make build databaseds dsconfig elk integration-test +make build archiver-timescale hdbppts-cm hdbppts-es # Start and stop sequence -make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim +make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim hdbppts-es hdbppts-cm archiver-timescale make start databaseds dsconfig elk # Give dsconfig and databaseds time to start @@ -39,6 +40,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim sleep 5 make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam +make start archiver-timescale hdbppts-cm hdbppts-es # starting order is important # Give devices time to restart # TODO(Corne Lukken): Use a nicer more reliable mechanism diff --git a/tangostationcontrol/tangostationcontrol/integration_test/toolkit/test_archiver.py b/tangostationcontrol/tangostationcontrol/integration_test/toolkit/test_archiver.py new file mode 100644 index 0000000000000000000000000000000000000000..ce3f1cac741098e7fa2beeb764a6cb863f8af9c6 --- /dev/null +++ b/tangostationcontrol/tangostationcontrol/integration_test/toolkit/test_archiver.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# +# This file is part of the LOFAR 2.0 Station Software +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +from tangostationcontrol.integration_test.base import BaseIntegrationTestCase +from tangostationcontrol.tangostationcontrol.toolkit.archiver import Archiver + +class TestArchiver(BaseIntegrationTestCase): + + def test_archiver_initialisation(self): + """Test archiver main attributes""" + self.archiver = Archiver() + self.assertIsNotNone(self.archiver) + self.assertEqual(self.archiver.cm_name,"archiving/hdbppts/confmanager01") + self.assertTrue(len(self.archiver.es_list)) # subscribers list not empty + + def test_hdbpp_library(self): + """Test if the correct hdbpp library is retrieved (TimescaleDB)""" + cm_name = self.archiver.cm_name + self.assertEqual('libhdb++timescale.so', self.archiver.get_hdbpp_libname(cm_name)) + + def test_next_subscriber(self): + """Test if there is an available subscriber""" + self.assertIsNotNone(self.archiver.get_next_subscriber()) + + def test_archiver_configuration(self): + """Test archiver configuration file""" + config_dict = self.archiver.get_configuration() + self.assertIsNotNone(config_dict)