Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bio-rd
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
danet
bio-rd
Commits
e482bdd4
Commit
e482bdd4
authored
6 years ago
by
Maximilian Wilhelm
Browse files
Options
Downloads
Patches
Plain Diff
Add test case for reflecting already reflected route.
Signed-off-by:
Maximilian Wilhelm
<
max@sdn.clinic
>
parent
1e4407d2
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
routingtable/adjRIBOut/adj_rib_out_test.go
+66
-0
66 additions, 0 deletions
routingtable/adjRIBOut/adj_rib_out_test.go
with
66 additions
and
0 deletions
routingtable/adjRIBOut/adj_rib_out_test.go
+
66
−
0
View file @
e482bdd4
...
@@ -776,6 +776,72 @@ func TestBestPathOnlyRRClient(t *testing.T) {
...
@@ -776,6 +776,72 @@ func TestBestPathOnlyRRClient(t *testing.T) {
},
},
expectedCount
:
1
,
expectedCount
:
1
,
},
},
{
name
:
"Remove NO_EXPORT route added before"
,
routesRemove
:
[]
*
route
.
Route
{
route
.
NewRoute
(
net
.
NewPfx
(
net
.
IPv4FromOctets
(
10
,
0
,
0
,
0
),
8
),
&
route
.
Path
{
Type
:
route
.
BGPPathType
,
BGPPath
:
&
route
.
BGPPath
{
ASPath
:
types
.
ASPath
{},
ASPathLen
:
0
,
Origin
:
0
,
MED
:
0
,
EBGP
:
false
,
Communities
:
[]
uint32
{
types
.
WellKnownCommunityNoExport
,
},
LargeCommunities
:
[]
types
.
LargeCommunity
{},
UnknownAttributes
:
nil
,
PathIdentifier
:
0
,
LocalPref
:
0
,
Source
:
net
.
IP
{},
ClusterList
:
[]
uint32
{
neighborBestOnlyRR
.
ClusterID
,
},
},
}),
},
expected
:
[]
*
route
.
Route
{},
expectedCount
:
0
,
},
{
name
:
"Add route with one entry in ClusterList and OriginatorID set (with success)"
,
routesAdd
:
[]
*
route
.
Route
{
route
.
NewRoute
(
net
.
NewPfx
(
net
.
IPv4FromOctets
(
10
,
0
,
0
,
0
),
8
),
&
route
.
Path
{
Type
:
route
.
BGPPathType
,
BGPPath
:
&
route
.
BGPPath
{
OriginatorID
:
42
,
ClusterList
:
[]
uint32
{
23
,
},
},
}),
},
expected
:
[]
*
route
.
Route
{
route
.
NewRoute
(
net
.
NewPfx
(
net
.
IPv4FromOctets
(
10
,
0
,
0
,
0
),
8
),
&
route
.
Path
{
Type
:
route
.
BGPPathType
,
BGPPath
:
&
route
.
BGPPath
{
ASPath
:
types
.
ASPath
{},
ASPathLen
:
0
,
Origin
:
0
,
MED
:
0
,
EBGP
:
false
,
Communities
:
[]
uint32
{},
LargeCommunities
:
[]
types
.
LargeCommunity
{},
UnknownAttributes
:
nil
,
PathIdentifier
:
0
,
LocalPref
:
0
,
Source
:
net
.
IP
{},
ClusterList
:
[]
uint32
{
neighborBestOnlyRR
.
ClusterID
,
23
,
},
OriginatorID
:
42
,
},
}),
},
expectedCount
:
1
,
},
}
}
for
i
,
test
:=
range
tests
{
for
i
,
test
:=
range
tests
{
...
...
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