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

L2SS-542: add first archiver integration tests

parent a39fe803
No related branches found
No related tags found
1 merge request!240Resolve L2SS-542 "Add timescaledb views"
...@@ -17,9 +17,10 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1 ...@@ -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 device-sdp device-recv device-sst device-unb2 device-xst
make build sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim make build sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
make build databaseds dsconfig elk integration-test make build databaseds dsconfig elk integration-test
make build archiver-timescale hdbppts-cm hdbppts-es
# Start and stop sequence # 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 make start databaseds dsconfig elk
# Give dsconfig and databaseds time to start # Give dsconfig and databaseds time to start
...@@ -39,6 +40,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim ...@@ -39,6 +40,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
sleep 5 sleep 5
make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam 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 # Give devices time to restart
# TODO(Corne Lukken): Use a nicer more reliable mechanism # TODO(Corne Lukken): Use a nicer more reliable mechanism
......
# -*- 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment