Remove InetAddress.getLocalHost() calls from OSPF tests.
This is an external dependency because it relies on DNS resolving localhost.
Change-Id: I1f8aa481b2173a166334c8a7bffb60647c666e12
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfDeviceTedImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfDeviceTedImplTest.java
index b11f537..db3cdaf 100644
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfDeviceTedImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfDeviceTedImplTest.java
@@ -21,7 +21,6 @@
import org.onlab.packet.Ip4Address;
import org.onlab.packet.Ip6Address;
-import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
@@ -127,10 +126,10 @@
/**
* Tests ipv6RouterIds() getter method.
*/
- @Test(expected = Exception.class)
+ @Test
public void testIpv6RouterIds() throws Exception {
List list = new ArrayList();
- list.add(Ip6Address.valueOf(InetAddress.getLocalHost()));
+ list.add(Ip6Address.valueOf(1));
ospfDeviceTed.setIpv6RouterIds(list);
assertThat(ospfDeviceTed.ipv6RouterIds().size(), is(1));
}
@@ -138,11 +137,11 @@
/**
* Tests ipv6RouterIds() setter method.
*/
- @Test(expected = Exception.class)
+ @Test
public void testSetIpv6RouterIds() throws Exception {
List list = new ArrayList();
- list.add(Ip6Address.valueOf(InetAddress.getLocalHost()));
+ list.add(Ip6Address.valueOf(1));
ospfDeviceTed.setIpv6RouterIds(list);
assertThat(ospfDeviceTed.ipv6RouterIds().size(), is(1));
}
-}
\ No newline at end of file
+}