diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-11-24 11:56:40 +0100 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2016-11-24 11:56:40 +0100 |
commit | e259ab7990b8179eda4462907ecebccd0e85b587 (patch) | |
tree | b0326a66b0a9d775e79dfbc495568df94643f3ef /lisp/lisp2vpp/src/test | |
parent | 927fb75d969b2d39c91ae6735f0127646348b73c (diff) |
HON-3 - Address logic refactoring
Ipv4/6 address logic refactored to not use
InetAddresses.fromLittleEndianArray to
prevent unnecessary reverting of address arrays
after fix introduced by VPP-132.
Removed unused ***reverted variants of conversion
logic.
Tested with these plugins
- Lisp
- V3po
- Nat
Change-Id: I6a0728f8b3dffd04e2edd822ec61542216cca824
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src/test')
3 files changed, 7 insertions, 8 deletions
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java index ba5639dc5..111a383dd 100755 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/LocalMappingCustomizerTest.java @@ -131,7 +131,7 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements assertNotNull(request); assertEquals("Locator", new String(request.locatorSetName)); - assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.eid).getValue()); + assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.eid).getValue()); assertEquals(0, request.eidType); assertEquals(1, request.isAdd); assertEquals(25, request.vni); @@ -154,7 +154,7 @@ public class LocalMappingCustomizerTest extends WriterCustomizerTest implements assertNotNull(request); assertEquals("Locator", new String(request.locatorSetName)); - assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.eid).getValue()); + assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.eid).getValue()); assertEquals(0, request.eidType); assertEquals(0, request.isAdd); assertEquals(25, request.vni); diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java index e3239202f..c4dc869f3 100755 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/MapResolverCustomizerTest.java @@ -74,7 +74,7 @@ public class MapResolverCustomizerTest extends WriterCustomizerTest implements I LispAddDelMapResolver request = resolverCaptor.getValue(); assertEquals(1, request.isAdd); - assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.ipAddress).getValue()); + assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.ipAddress).getValue()); } @@ -97,7 +97,7 @@ public class MapResolverCustomizerTest extends WriterCustomizerTest implements I LispAddDelMapResolver request = resolverCaptor.getValue(); assertEquals(0, request.isAdd); - assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.ipAddress).getValue()); + assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.ipAddress).getValue()); } } diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java index 538263ba4..8b31fa64f 100755 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizerTest.java @@ -109,8 +109,7 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements @Test(expected = NullPointerException.class) public void testWriteCurrentAttributesBadData() throws WriteFailedException { - customizer - .writeCurrentAttributes(null, mock(RemoteMapping.class), writeContext); + customizer.writeCurrentAttributes(null, mock(RemoteMapping.class), writeContext); } @Test @@ -123,7 +122,7 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements assertNotNull(request); assertEquals(1, request.isAdd); - assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.eid).getValue()); + assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.eid).getValue()); assertEquals(25, request.vni); } @@ -148,7 +147,7 @@ public class RemoteMappingCustomizerTest extends WriterCustomizerTest implements assertNotNull(request); assertEquals(0, request.isAdd); - assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.eid).getValue()); + assertEquals("192.168.2.1", arrayToIpv4AddressNoZone(request.eid).getValue()); assertEquals(25, request.vni); } |