Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
cd8ad239
Commit
cd8ad239
authored
3 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-542
: add first archiver integration tests
parent
a39fe803
No related branches found
No related tags found
1 merge request
!240
Resolve L2SS-542 "Add timescaledb views"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sbin/run_integration_test.sh
+3
-1
3 additions, 1 deletion
sbin/run_integration_test.sh
tangostationcontrol/tangostationcontrol/integration_test/toolkit/test_archiver.py
+34
-0
34 additions, 0 deletions
...ostationcontrol/integration_test/toolkit/test_archiver.py
with
37 additions
and
1 deletion
sbin/run_integration_test.sh
+
3
−
1
View file @
cd8ad239
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
tangostationcontrol/tangostationcontrol/integration_test/toolkit/test_archiver.py
0 → 100644
+
34
−
0
View file @
cd8ad239
# -*- 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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment