Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
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
dashboardv3
inventory-provider
Commits
d12917d0
Commit
d12917d0
authored
6 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
added pass criteria for juniper hostname derivation
parent
3c9b9ad0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_junosspace_io.py
+11
-2
11 additions, 2 deletions
test/test_junosspace_io.py
with
11 additions
and
2 deletions
test/test_junosspace_io.py
+
11
−
2
View file @
d12917d0
...
...
@@ -35,11 +35,20 @@ def test_junosspace_devices_parsing(data_config):
def
test_router_hostname_derivation
(
mocked_redis
):
"""
test result depends specifically on the test data set containing
a realistic snapshot
:param mocked_redis:
:return:
"""
config
=
{
'
redis
'
:
{
'
hostname
'
:
None
,
'
port
'
:
None
}
}
for
hostname
in
worker
.
_derive_router_hostnames
(
config
):
assert
re
.
match
(
'
^mx[\d].+\.geant\.net$
'
,
hostname
)
hostnames
=
list
(
worker
.
_derive_router_hostnames
(
config
))
assert
hostnames
# test data is non-empty
for
h
in
hostnames
:
assert
re
.
match
(
r
'
^mx[12].+\.geant\.net$
'
,
h
)
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