Updated/fixed the SDN-IP BGP unit tests after some of the BGP-related
code whas changed. Change-Id: Ie36ad03e3ae7544e7883e2b2aca4c94537750321
Showing
3 changed files
with
12 additions
and
12 deletions
... | @@ -66,8 +66,8 @@ public class AsPathTest { | ... | @@ -66,8 +66,8 @@ public class AsPathTest { |
66 | 66 | ||
67 | String expectedString = | 67 | String expectedString = |
68 | "AsPath{pathSegments=" + | 68 | "AsPath{pathSegments=" + |
69 | - "[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " + | 69 | + "[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " + |
70 | - "PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}"; | 70 | + "PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}"; |
71 | assertThat(asPath.toString(), is(expectedString)); | 71 | assertThat(asPath.toString(), is(expectedString)); |
72 | } | 72 | } |
73 | 73 | ||
... | @@ -177,8 +177,8 @@ public class AsPathTest { | ... | @@ -177,8 +177,8 @@ public class AsPathTest { |
177 | 177 | ||
178 | String expectedString = | 178 | String expectedString = |
179 | "AsPath{pathSegments=" + | 179 | "AsPath{pathSegments=" + |
180 | - "[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " + | 180 | + "[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " + |
181 | - "PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}"; | 181 | + "PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}"; |
182 | assertThat(asPath.toString(), is(expectedString)); | 182 | assertThat(asPath.toString(), is(expectedString)); |
183 | } | 183 | } |
184 | } | 184 | } | ... | ... |
... | @@ -130,9 +130,9 @@ public class BgpRouteEntryTest { | ... | @@ -130,9 +130,9 @@ public class BgpRouteEntryTest { |
130 | 130 | ||
131 | String expectedString = | 131 | String expectedString = |
132 | "BgpRouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8, " + | 132 | "BgpRouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8, " + |
133 | - "bgpId=10.0.0.1, origin=0, asPath=AsPath{pathSegments=" + | 133 | + "bgpId=10.0.0.1, origin=IGP, asPath=AsPath{pathSegments=" + |
134 | - "[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " + | 134 | + "[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " + |
135 | - "PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}, " + | 135 | + "PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}, " + |
136 | "localPref=100, multiExitDisc=20}"; | 136 | "localPref=100, multiExitDisc=20}"; |
137 | assertThat(bgpRouteEntry.toString(), is(expectedString)); | 137 | assertThat(bgpRouteEntry.toString(), is(expectedString)); |
138 | } | 138 | } |
... | @@ -504,9 +504,9 @@ public class BgpRouteEntryTest { | ... | @@ -504,9 +504,9 @@ public class BgpRouteEntryTest { |
504 | 504 | ||
505 | String expectedString = | 505 | String expectedString = |
506 | "BgpRouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8, " + | 506 | "BgpRouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8, " + |
507 | - "bgpId=10.0.0.1, origin=0, asPath=AsPath{pathSegments=" + | 507 | + "bgpId=10.0.0.1, origin=IGP, asPath=AsPath{pathSegments=" + |
508 | - "[PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}, " + | 508 | + "[PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}, " + |
509 | - "PathSegment{type=1, segmentAsNumbers=[4, 5, 6]}]}, " + | 509 | + "PathSegment{type=AS_SET, segmentAsNumbers=[4, 5, 6]}]}, " + |
510 | "localPref=100, multiExitDisc=20}"; | 510 | "localPref=100, multiExitDisc=20}"; |
511 | assertThat(bgpRouteEntry.toString(), is(expectedString)); | 511 | assertThat(bgpRouteEntry.toString(), is(expectedString)); |
512 | } | 512 | } | ... | ... |
... | @@ -52,7 +52,7 @@ public class PathSegmentTest { | ... | @@ -52,7 +52,7 @@ public class PathSegmentTest { |
52 | BgpRouteEntry.PathSegment pathSegment = generatePathSegment(); | 52 | BgpRouteEntry.PathSegment pathSegment = generatePathSegment(); |
53 | 53 | ||
54 | String expectedString = | 54 | String expectedString = |
55 | - "PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}"; | 55 | + "PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}"; |
56 | assertThat(pathSegment.toString(), is(expectedString)); | 56 | assertThat(pathSegment.toString(), is(expectedString)); |
57 | } | 57 | } |
58 | 58 | ||
... | @@ -124,7 +124,7 @@ public class PathSegmentTest { | ... | @@ -124,7 +124,7 @@ public class PathSegmentTest { |
124 | BgpRouteEntry.PathSegment pathSegment = generatePathSegment(); | 124 | BgpRouteEntry.PathSegment pathSegment = generatePathSegment(); |
125 | 125 | ||
126 | String expectedString = | 126 | String expectedString = |
127 | - "PathSegment{type=2, segmentAsNumbers=[1, 2, 3]}"; | 127 | + "PathSegment{type=AS_SEQUENCE, segmentAsNumbers=[1, 2, 3]}"; |
128 | assertThat(pathSegment.toString(), is(expectedString)); | 128 | assertThat(pathSegment.toString(), is(expectedString)); |
129 | } | 129 | } |
130 | } | 130 | } | ... | ... |
-
Please register or login to post a comment