Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
brian-dashboard-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
brian
brian-dashboard-manager
Commits
f485c8eb
Commit
f485c8eb
authored
3 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
finished (basic) eumetsat multicast test
parent
70c5ac5e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_eumetsat_multicast.py
+16
-10
16 additions, 10 deletions
test/test_eumetsat_multicast.py
with
16 additions
and
10 deletions
test/test_eumetsat_multicast.py
+
16
−
10
View file @
f485c8eb
import
responses
from
brian_dashboard_manager.inventory_provider.interfaces
import
\
get_eumetsat_multicast_subscriptions
from
brian_dashboard_manager.templating.eumetsat
\
import
generate_eumetsat_multicast
TEST_DATA
=
[
...
...
@@ -57,15 +59,19 @@ def test_eumetsat_subscriptions(data_config, client):
url
=
f
'
{
data_config
[
"
inventory_provider
"
]
}
/poller/eumetsat-multicast
'
,
json
=
TEST_DATA
)
subscription_data
=
{}
for
s
in
TEST_DATA
:
subscription_data
.
setdefault
(
s
[
'
router
'
],
set
()).
add
(
s
[
'
subscription
'
])
expected_titles
=
[
f
'
{
name
}
subscriptions
'
for
name
in
subscription_data
.
keys
()]
subscriptions
=
get_eumetsat_multicast_subscriptions
(
data_config
[
'
inventory_provider
'
])
print
(
subscriptions
)
# dashboards = list(generate_gws(gws_data, 'testdatasource'))
#
# assert len(dashboards) == 2
#
# assert dashboards[0]['title'] == 'GWS Direct - Cogent'
# assert len(dashboards[0]['panels']) == 3
#
# assert dashboards[1]['title'] == 'GWS Direct - Telia'
# assert len(dashboards[1]['panels']) == 1
dashboards
=
list
(
generate_eumetsat_multicast
(
subscriptions
,
'
testdatasource
'
))
assert
len
(
dashboards
)
==
len
(
expected_titles
)
assert
all
(
d
[
'
title
'
]
in
expected_titles
for
d
in
dashboards
)
# just use 2, instead of something smart, since the data is above
assert
all
(
len
(
d
[
'
panels
'
])
==
2
for
d
in
dashboards
)
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