Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
bird-tools
Commits
ad889128
Commit
ad889128
authored
Jun 11, 2020
by
Matous Holinka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mh-bird_tables: argument values were modified
parent
698196f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
netlab/cf-ospf-base/test-cf-ospf-base.py
netlab/cf-ospf-base/test-cf-ospf-base.py
+2
-2
netlab/tests/kernel.py
netlab/tests/kernel.py
+3
-3
No files found.
netlab/cf-ospf-base/test-cf-ospf-base.py
View file @
ad889128
...
...
@@ -29,10 +29,10 @@ def test_krt_routes_ipv6(exp_devs: str):
@
pytest
.
mark
.
parametrize
(
"exp_devs"
,
EXPECTED_DEVICES
)
def
test_bird_routes_ipv4
(
exp_devs
:
str
):
"""IPv4: get the content of BIRD tables and check it"""
tk
.
test_bird_routes
(
"
bird
"
,
exp_devs
,
"master4"
)
tk
.
test_bird_routes
(
"
master4
"
,
exp_devs
,
"master4"
)
@
pytest
.
mark
.
parametrize
(
"exp_devs"
,
EXPECTED_DEVICES
)
def
test_bird_routes_ipv6
(
exp_devs
:
str
):
"""IPv6: get the content of BIRD tables and check it"""
tk
.
test_bird_routes
(
"
bird
"
,
exp_devs
,
"master6"
)
tk
.
test_bird_routes
(
"
master6
"
,
exp_devs
,
"master6"
)
netlab/tests/kernel.py
View file @
ad889128
...
...
@@ -55,7 +55,7 @@ def save_bird_routes(key: str, dev: str, table: str, loc: str = "temp") -> None:
os
.
system
(
f
"""
\
./tests/get_stdout_bird '
{
dev
}
'
\
{
table
}
>
{
loc
}
/
{
table
}
-
{
dev
}
{
table
}
>
{
loc
}
/
{
key
}
-
{
dev
}
"""
)
...
...
@@ -73,8 +73,8 @@ def check_bird_routes_timeout(key: str, dev: str, table: str) -> None:
def
check_bird_routes
(
key
:
str
,
dev
:
str
,
table
:
str
)
->
None
:
save_bird_routes
(
key
,
dev
,
table
)
current_table
=
read_file
(
f
"temp/
{
table
}
-
{
dev
}
"
)
saved_table
=
read_file
(
f
"
{
cf
.
datadir
}
/
{
table
}
-
{
dev
}
"
)
current_table
=
read_file
(
f
"temp/
{
key
}
-
{
dev
}
"
)
saved_table
=
read_file
(
f
"
{
cf
.
datadir
}
/
{
key
}
-
{
dev
}
"
)
for
_
in
current_table
:
return
saved_table
==
current_table
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment